fix: resolve symlinks before locating compose project
Use readlink -f to resolve the script's real path so that reload.sh can be invoked through a symlink from any directory.
This commit is contained in:
1 parent
f4e9f78837
commit
bd9e2c03ae
1 file changed
+2
-1
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
cd -- "$(dirname -- "${BASH_SOURCE[0]}")"
|
||||
source="$(readlink -f -- "${BASH_SOURCE[0]}")"
|
||||
cd -- "$(dirname -- "$source")"
|
||||
|
||||
exec docker compose exec -T nginx sh -s <./.reload-in-container.sh
|
||||
Reference in new issue
Block a user