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
|
# When run from a dir with would-format configured, return
|
||||||
# would-format's own directory
|
# would-format's own directory
|
||||||
wf_root() {
|
wf_root() {
|
||||||
|
set +u
|
||||||
|
if [[ ! -z "${WF_ROOT}" ]]; then
|
||||||
|
echo "$WF_ROOT"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
set -u
|
||||||
|
|
||||||
arg=$(pwd)/bin/would-reformat.sh
|
arg=$(pwd)/bin/would-reformat.sh
|
||||||
|
|
||||||
pr=$(project_root "$arg")
|
pr=$(project_root "$arg")
|
||||||
|
|||||||
Reference in New Issue
Block a user