lib/autobuild/subcommand.rb in autobuild-1.6.0 vs lib/autobuild/subcommand.rb in autobuild-1.6.1
- old
+ new
@@ -206,10 +206,10 @@
cread, cwrite = IO.pipe # to control that exec goes well
cwrite.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC)
pid = fork do
- if options[:working_directory]
+ if options[:working_directory] && (options[:working_directory] != Dir.pwd)
Dir.chdir(options[:working_directory])
end
logfile.puts "in directory #{Dir.pwd}"
begin
cwrite.sync = true