summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2014-06-27 11:21:20 +0200
committerAzul <azul@riseup.net>2014-06-27 11:21:20 +0200
commit6318205a31bda0c85cec4e3f9d547290197c4548 (patch)
treec9cb4c91ef966964db187365b2573a7d3e129aad
parent3c431ed42419dd55fc4064133b899cb494278051 (diff)
check for ARGV.first before testing it
Otherwise we will crash if no args are passed. Now we print the usage message
-rwxr-xr-xbin/tapicero2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/tapicero b/bin/tapicero
index 49e73c2..658dace 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