Skip to content

Commit bef07b3

Browse files
committed
ensure that a path is passed to lint.sh, otherwise default to the current directory
1 parent 8e0e114 commit bef07b3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

scripts/lint.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ prettierArgs+=('--ignore-unknown')
2525
# Passthrough arguments and flags
2626
prettierArgs+=($@)
2727

28+
# Ensure that a path is passed, otherwise default to the current directory
29+
if [ -z "$@" ]; then
30+
prettierArgs+=(.)
31+
fi
32+
2833
# Execute
2934
yarn prettier "${prettierArgs[@]}"
3035

0 commit comments

Comments
 (0)