client: fix base path location deduction when sourced
- Since these files are only ever sourced, deduction must be relative to `BASH_SOURCE` (or else realpath will break) - Fixes client-side `plugins` completion * realpath breakage was introduced in #301
This commit is contained in:
2
client/conf.d/client/env/gen.bash
vendored
2
client/conf.d/client/env/gen.bash
vendored
@@ -67,7 +67,7 @@ fi
|
||||
# Client-specific environment, including bind mounts (client view)
|
||||
|
||||
if [ -z "$global_client_base_path" ]; then
|
||||
global_client_base_path="$(dirname "$(realpath -s $0)" | rev | cut -d'/' -f3- | rev)"
|
||||
global_client_base_path="$(realpath -s "${BASH_SOURCE[0]}" | rev | cut -d'/' -f7- | rev)"
|
||||
fi
|
||||
|
||||
if [ -z "$DOCKER_FINANCE_CLIENT_CONF" ]; then
|
||||
|
||||
Reference in New Issue
Block a user