diff --git a/_reformat-common.bash b/_reformat-common.bash index 3a16f33..e9096e2 100644 --- a/_reformat-common.bash +++ b/_reformat-common.bash @@ -49,8 +49,11 @@ wf_root() { set -u arg=$(pwd)/bin/would-reformat.sh + PROJECT_ROOT=$(project_root "$arg") - pr=$(project_root "$arg") + pushd "$PROJECT_ROOT" 2>&1 >/dev/null + + pr="$PROJECT_ROOT" link="$pr/bin/would-reformat.sh" @@ -59,6 +62,8 @@ wf_root() { out="$original" + popd 2>&1 >/dev/null + echo "$out" return 0 }