Skip to content

Commit b8d1b7e

Browse files
committed
Address shellcheck warnings
1 parent 009d59a commit b8d1b7e

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

run-hook

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,14 @@
1010

1111
# set -x
1212

13-
cd "$(dirname "$0")"
13+
readonly hookdir="$(dirname "$0")"
14+
readonly hook="$(basename "$0")"
15+
16+
cd "${hookdir}" || {
17+
echo "Aborting: could not cd into '${hookdir}'"
18+
exit -1
19+
}
20+
# shellcheck disable=SC1090
1421
source captain-hook/captain-hook.sh
1522

16-
runHook "$(basename "$0")" "$@"
23+
runHook "${hook}" "$@"

0 commit comments

Comments
 (0)