Recycle wf_root output
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user