9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# File 'lib/roast/cli.rb', line 9
def start(argv)
roast_args, = split_at_separator(argv)
show_help = false parser = OptionParser.new do |opts|
opts.on("-h", "--help") { show_help = true }
end
parser.order!(roast_args)
command = roast_args.first
if show_help || command == "help"
help
elsif command == "version"
puts "Roast version #{Roast::VERSION}"
elsif command == "execute"
roast_args.shift
run_execute(roast_args, )
elsif command && resolve_workflow_path(command)
run_execute(roast_args, )
elsif command
$stderr.puts "Could not find command or workflow file \"#{command}\"\n\n"
help
exit(1)
else
help
end
end
|