Skip to content

fix: quote $BASEDIR in launcher scripts to support paths with spaces#178

Merged
iaik-jheher merged 1 commit into
a-sit:mainfrom
mathoebinger:fix/quote-basedir-in-launcher-scripts
Jul 22, 2026
Merged

fix: quote $BASEDIR in launcher scripts to support paths with spaces#178
iaik-jheher merged 1 commit into
a-sit:mainfrom
mathoebinger:fix/quote-basedir-in-launcher-scripts

Conversation

@mathoebinger

Copy link
Copy Markdown
Contributor

Problem

The macOS and Linux launcher scripts fail when the application is installed on a path containing spaces (e.g. /Volumes/External Apps/).

The unquoted $BASEDIR variable undergoes word splitting, causing the shell to interpret the path fragment before the space as the executable name:

Contents/Resources/script: line 4: /Volumes/External: No such file or directory
Contents/Resources/script: line 4: exec: /Volumes/External: cannot execute: No such file or directory

Fix

  • Quote "$BASEDIR/jre/bin/java" in both pdf-over_mac.sh and pdf-over_linux.sh
  • Modernize the Linux script to use $(dirname ...) with proper quoting instead of backticks

Testing

Verified on macOS (Apple Silicon) with the app located at /Volumes/External Apps/External Applications/PDF-Over.app — the app now launches successfully.

The macOS and Linux launcher scripts fail when the application is
installed on a path containing spaces (e.g. /Volumes/External Apps/).

The unquoted $BASEDIR variable undergoes word splitting, causing the
shell to interpret the path fragment before the space as the executable
name, resulting in 'No such file or directory'.

Fix by quoting "$BASEDIR/jre/bin/java" in both scripts. Also modernize
the Linux script to use $(dirname ...) with proper quoting instead of
backticks.
@iaik-jheher
iaik-jheher merged commit 3ca682e into a-sit:main Jul 22, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants