Make shellcheck happier
This commit is contained in:
@@ -16,10 +16,10 @@ OPERATING_SYSTEM=$(get_os)
|
||||
|
||||
# For a given file, return its corresponding project root.
|
||||
function project_root() {
|
||||
pushd $(dirname "$1") 2>&1 >/dev/null
|
||||
pushd "$(dirname "$1")" >/dev/null 2>&1 || exit 101
|
||||
out=$(git rev-parse --show-toplevel)
|
||||
ret="$?"
|
||||
popd 2>&1 >/dev/null
|
||||
popd >/dev/null 2>&1 || exit 1
|
||||
|
||||
if [[ "$ret" != "0" ]]; then
|
||||
echo -n ""
|
||||
@@ -35,12 +35,12 @@ function project_root() {
|
||||
wf_root() {
|
||||
arg=$(pwd)/bin/would-reformat.sh
|
||||
|
||||
pr=$(project_root $arg)
|
||||
pr=$(project_root "$arg")
|
||||
|
||||
link="$pr/bin/would-reformat.sh"
|
||||
|
||||
original0=$(resolve_symlink "$link")
|
||||
original=$(normalize_dir_of_file $original0)
|
||||
original=$(normalize_dir_of_file "$original0")
|
||||
|
||||
out="$original"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user