OSX: tune RhoSimulator build
@@ -580,6 +580,7 @@ class Jake
def self.run3_dont_fail(command, cd = nil, env = {}, use_run2 = false)
set_list = []
+ currentdir = ""
env.each_pair do |k, v|
if RUBY_PLATFORM =~ /(win|w)32$/
set_list << "set \"#{k}=#{v}\"&&"
@@ -596,10 +597,15 @@ class Jake
if RUBY_PLATFORM =~ /(win|w)32$/
cd_ = cd.gsub('/', "\\")
to_run = "cd /d \"#{cd_}\"&&#{to_run}"
+ else
+ if use_run2
+ currentdir = Dir.pwd()
+ Dir.chdir cd
else
to_run = "cd '#{cd}'&&#{to_run}"
end
end
+ end
if !env.nil?
to_print = "ENV: #{env}\n#{to_print}"
@@ -612,6 +618,9 @@ class Jake
self.run2(to_run, []) do |line|
log Logger::DEBUG,line
end
+ if not cd.nil?
+ Dir.chdir currentdir
+ end
return $?.exitstatus == 0
else
res = system(to_run)
