Skip to content

Commit

Permalink
autogazelle: use default syntax for expanding $1 (#627)
Browse files Browse the repository at this point in the history
When calling bazel without parameters, the script was giving an error "$1: unbound variable".
This fixes it by using an explicit default value of an empty string.
  • Loading branch information
ikorolev93 authored and Jay Conrod committed Aug 23, 2019
1 parent 0db127e commit 67c9ddf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/autogazelle/autogazelle.bash
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

set -euo pipefail

case "$1" in
case "${1:-}" in
build|coverage|cquery|fetch|mobile-install|print_action|query|run|test)
"$BAZEL_REAL" run @bazel_gazelle//cmd/autogazelle -- -gazelle=//:gazelle
echo "done running autogazelle" 1>&2
Expand Down

0 comments on commit 67c9ddf

Please sign in to comment.