Recycle wf_root output

This commit is contained in:
Michael Wolf
2023-09-30 17:17:58 -06:00
parent fd384a91ea
commit 21736cf0a2

View File

@@ -41,6 +41,13 @@ function project_root() {
# When run from a dir with would-format configured, return
# would-format's own directory
wf_root() {
set +u
if [[ ! -z "${WF_ROOT}" ]]; then
echo "$WF_ROOT"
return 0
fi
set -u
arg=$(pwd)/bin/would-reformat.sh
pr=$(project_root "$arg")