Skip to content

Commit 1f5326e

Browse files
committed
client: Fix 'unbound variable' error on missing args
1 parent b705b63 commit 1f5326e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

client/git-simpleserver

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,13 +407,15 @@ prepare_config() {
407407
}
408408

409409
CONFIG_FILE_PATH="$HOME/.git-simpleserver/config.yaml"
410+
set +u
410411
case "$1" in
411412
"--config" | "-c")
412413
shift
413414
CONFIG_FILE_PATH="$1"
414415
shift
415416
;;
416417
esac
418+
set -u
417419
if [ ! -f "$CONFIG_FILE_PATH" ]; then
418420
echo "Config file '$CONFIG_FILE_PATH' does not exist"
419421
exit 1

0 commit comments

Comments
 (0)