Skip to content

Commit df4dbe2

Browse files
max-maagpsychedelicious
authored andcommitted
Fix invoke.sh not detecting symlinks
When invoke.sh is executed using a symlink with a working directory outside of InvokeAI's root directory, it will fail. invoke.sh attempts to cd into the correct directory at the start of the script, but will cd into the directory of the symlink instead. This commit fixes that.
1 parent 713bd11 commit df4dbe2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

installer/templates/invoke.sh.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
set -eu
1818

1919
# Ensure we're in the correct folder in case user's CWD is somewhere else
20-
scriptdir=$(dirname "$0")
20+
scriptdir=$(dirname $(readlink -f "$0"))
2121
cd "$scriptdir"
2222

2323
. .venv/bin/activate

0 commit comments

Comments
 (0)