diff options
author | Azul <azul@riseup.net> | 2014-06-27 11:21:20 +0200 |
---|---|---|
committer | Azul <azul@riseup.net> | 2014-07-01 10:22:20 +0200 |
commit | 22b785484d6df25348854ecd88f9193c0a825c44 (patch) | |
tree | 6e57e97b5e843dc3ce5e6e53ae85829791b18554 /bin | |
parent | aac4577031728dab84f077b54e461fcb813ac0c3 (diff) |
check for ARGV.first before testing it
Otherwise we will crash if no args are passed. Now we print the usage message
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/tapicero | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/tapicero b/bin/tapicero index 72f974b..42030d1 100755 --- a/bin/tapicero +++ b/bin/tapicero @@ -51,7 +51,7 @@ Tapicero::CONFIGS.concat ARGV.grep(/\.ya?ml$/) # if flags have been set but an action is missing we assume # tapicero should run in foreground. -if ARGV.first.start_with?('--') +if ARGV.first && ARGV.first.start_with?('--') ARGV.unshift '--' ARGV.unshift 'run' end |