Skip to content

Commit

Permalink
Fix invoke.sh not detecting symlinks
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
max-maag authored and psychedelicious committed Aug 16, 2024
1 parent 713bd11 commit df4dbe2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion installer/templates/invoke.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
set -eu

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

. .venv/bin/activate
Expand Down

0 comments on commit df4dbe2

Please sign in to comment.