Make start scripts work with symlinks #2

Merged
sql-workbench merged 1 commits from unguiculus/workbench:feature/scripts into master 1 year ago

This fixes running the workbench using symlinks. I have symlinks to the
workbench start scripts in my $HOME/bin directory. Running with a
symlink from that folder would cause this error, the reason being that
the way the SCRIPT_PATH variable was created did not follow symlinks:

Error: Could not find or load main class workbench.WbStarter
Caused by: java.lang.ClassNotFoundException: workbench.WbStarter

Along with this change, the shebang is updated to look up Bash from the
environment. That's important on a Mac when you don't want to use the
ancient default Bash (3.2) that comes with the MacOS but a newer one
that's e. g. installed via Homebrew and can be found in
/usr/local/bin/bash.

This fixes running the workbench using symlinks. I have symlinks to the workbench start scripts in my $HOME/bin directory. Running with a symlink from that folder would cause this error, the reason being that the way the SCRIPT_PATH variable was created did not follow symlinks: ``` Error: Could not find or load main class workbench.WbStarter Caused by: java.lang.ClassNotFoundException: workbench.WbStarter ``` Along with this change, the shebang is updated to look up Bash from the environment. That's important on a Mac when you don't want to use the ancient default Bash (3.2) that comes with the MacOS but a newer one that's e. g. installed via Homebrew and can be found in /usr/local/bin/bash.
sql-workbench merged commit 919f427edf into master 1 year ago
Owner

Interesting, I had Mac users test those scripts ;)
Thanks

Interesting, I had Mac users test those scripts ;) Thanks
The pull request has been merged as 919f427edf.
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This pull request currently doesn't have any dependencies.

Loading…
There is no content yet.