From 4eff8f7192eb52766f63c59cfd8cf9892be71cbf Mon Sep 17 00:00:00 2001 From: jwerle Date: Wed, 30 Mar 2022 18:52:50 -0400 Subject: [PATCH] fix(lib/run/run.sh): change directory before running local commnd --- lib/run/run.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/run/run.sh b/lib/run/run.sh index 1d62281..ec8d0fe 100755 --- a/lib/run/run.sh +++ b/lib/run/run.sh @@ -96,6 +96,8 @@ bpkg_run () { local cmd="$(bpkg_package commands "$1" 2>/dev/null)" if [ -n "$cmd" ]; then + local root="$(dirname "$(bpkg_package --path)")" + cd "$root" || return 1 # shellcheck disable=SC2230 # shellcheck source=lib/env/env.sh source "$(which bpkg-env)"