lib/brief/cli/run.rb in brief-1.15.2 vs lib/brief/cli/run.rb in brief-1.15.3
- old
+ new
@@ -1,12 +1,16 @@
command "run command" do |c|
c.syntax = 'brief run FILE'
c.description = 'run a script in the context of the briefcase'
+ c.option '--root PATH', String, 'The briefcase root'
+
c.action do |args, options|
+ options.default(root: Pathname(args.first || Brief.pwd))
+
command = args.first.to_s.to_sym
- bc = Brief.case
+ bc = Brief.case = Brief::Briefcase.new(root: Pathname(args.first || options.root))
bc = bc.call if bc.respond_to?(:call)
if !Brief.commands[command.to_sym]
puts "Invalid command. #{ Brief.commands.keys }"
else