From 22b785484d6df25348854ecd88f9193c0a825c44 Mon Sep 17 00:00:00 2001 From: Azul Date: Fri, 27 Jun 2014 11:21:20 +0200 Subject: check for ARGV.first before testing it Otherwise we will crash if no args are passed. Now we print the usage message --- bin/tapicero | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3