add optional options argument to Environment#execute()
This commit is contained in:
parent
136ad0f29a
commit
0c0c8f734f
@ -119,7 +119,7 @@ module Rscons
|
|||||||
@varset.merge(extra_vars).expand_varref(command_template)
|
@varset.merge(extra_vars).expand_varref(command_template)
|
||||||
end
|
end
|
||||||
|
|
||||||
def execute(short_desc, command)
|
def execute(short_desc, command, options = {})
|
||||||
print_command = proc do
|
print_command = proc do
|
||||||
puts command.map { |c| c =~ /\s/ ? "'#{c}'" : c }.join(' ')
|
puts command.map { |c| c =~ /\s/ ? "'#{c}'" : c }.join(' ')
|
||||||
end
|
end
|
||||||
@ -128,7 +128,7 @@ module Rscons
|
|||||||
elsif @varset[:echo] == :short
|
elsif @varset[:echo] == :short
|
||||||
puts short_desc
|
puts short_desc
|
||||||
end
|
end
|
||||||
system(*command).tap do |result|
|
system(*command, options).tap do |result|
|
||||||
unless result or @varset[:echo] == :command
|
unless result or @varset[:echo] == :command
|
||||||
$stdout.write "Failed command was: "
|
$stdout.write "Failed command was: "
|
||||||
print_command.call
|
print_command.call
|
||||||
|
Loading…
x
Reference in New Issue
Block a user