commit | 92793dc56cef62bbca7c4efc60bab5e8aaa95ce7 | [log] [tgz] |
---|---|---|
author | Steven Moreland <smoreland@google.com> | Tue Feb 25 18:30:18 2020 -0800 |
committer | Steven Moreland <smoreland@google.com> | Tue Feb 25 18:33:53 2020 -0800 |
tree | 6d5ba5cde70b9f8d66040dcba65b6dd984cb7666 | |
parent | 5832bf1f5a949bc32a9b8f57ed46cb7f06606fe6 [diff] [blame] |
lunch: error on >1 arg (before ignored) Bug: N/A Test: lunch w/ 0, 1, and 2 args Change-Id: Icbeb511e836b08cbd64b08a23b0e4820039b12ab
diff --git a/envsetup.sh b/envsetup.sh index 793f4b6..d533d0d 100644 --- a/envsetup.sh +++ b/envsetup.sh
@@ -599,7 +599,12 @@ { local answer - if [ "$1" ] ; then + if [[ $# -gt 1 ]]; then + echo "usage: lunch [target]" >&2 + return 1 + fi + + if [ "$1" ]; then answer=$1 else print_lunch_menu