From 94ca5e602458399ee218e0417cef597a79abc7c3 Mon Sep 17 00:00:00 2001 From: Sami Samhuri Date: Sat, 22 Jan 2022 15:42:03 -0800 Subject: [PATCH] [ruby] Require the command argument after -c --- ruby/shell/cli.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ruby/shell/cli.rb b/ruby/shell/cli.rb index 1cf74bd..ac549d0 100644 --- a/ruby/shell/cli.rb +++ b/ruby/shell/cli.rb @@ -35,6 +35,10 @@ module Shell case arg when '-c' options[:command] = args.shift + if options[:command].nil? + warn 'ERROR: expected string after -c' + exit 1 + end when '-v', '--verbose' options[:verbose] = true else