From 5319677a4c258d0c83a3b74b7a0f42da3f5e9373 Mon Sep 17 00:00:00 2001 From: Michael Wolf Date: Sat, 30 Sep 2023 17:18:26 -0600 Subject: [PATCH] Fix wf_root --- _reformat-common.bash | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 }