mirror of
https://github.com/samsonjs/csc360-a1-shell.git
synced 2026-03-25 08:45:52 +00:00
[ruby] Require the command argument after -c
This commit is contained in:
parent
c01e3a5fe6
commit
94ca5e6024
1 changed files with 4 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue