Skip to content

Commit

Permalink
fix: BASH_SOURCE for plugin directory resolution (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
hollow committed Feb 25, 2021
1 parent e148004 commit 7cfb499
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bin/exec-env
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

set -euo pipefail

current_script_path="${BASH_SOURCE[0]}"
gcloud_plugin_dir="$(dirname "$(dirname "$current_script_path")")"

# shellcheck source=../lib/utils.bash
source "$(dirname "$0")/../lib/utils.bash"
source "${gcloud_plugin_dir}/lib/utils.bash"

if [[ ! -x "$(command -v python)" ]]; then
log_failure_and_exit "Python not found and is required for gcloud. Might I suggest https://github.com/danhper/asdf-python"
Expand Down

0 comments on commit 7cfb499

Please sign in to comment.