Skip to content

Commit

Permalink
client: Fix 'unbound variable' error on missing args
Browse files Browse the repository at this point in the history
  • Loading branch information
leonklingele committed Oct 19, 2017
1 parent b705b63 commit 1f5326e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client/git-simpleserver
Original file line number Diff line number Diff line change
Expand Up @@ -407,13 +407,15 @@ prepare_config() {
}

CONFIG_FILE_PATH="$HOME/.git-simpleserver/config.yaml"
set +u
case "$1" in
"--config" | "-c")
shift
CONFIG_FILE_PATH="$1"
shift
;;
esac
set -u
if [ ! -f "$CONFIG_FILE_PATH" ]; then
echo "Config file '$CONFIG_FILE_PATH' does not exist"
exit 1
Expand Down

0 comments on commit 1f5326e

Please sign in to comment.