Commit 4f6b5583 authored by Boris Bügling's avatar Boris Bügling

Support for spaces in full path to executables.

parent 16e5b431
...@@ -53,7 +53,7 @@ module Pod ...@@ -53,7 +53,7 @@ module Pod
require 'open4' require 'open4'
full_command = "#{bin} #{command}" full_command = "\"#{bin}\" #{command}"
if Config.instance.verbose? if Config.instance.verbose?
UI.message("$ #{full_command}") UI.message("$ #{full_command}")
......
...@@ -9,5 +9,15 @@ module Pod ...@@ -9,5 +9,15 @@ module Pod
end.should.raise Informative end.should.raise Informative
e.message.should.match(/false/) e.message.should.match(/false/)
end end
it 'should support spaces in the full path of the command' do
cmd = '/Spa ces/are/fun/false'
Executable.stubs(:`).returns(cmd)
result = mock
result.stubs(:success?).returns(true)
Open4.expects(:spawn).with("\"#{cmd}\" ", :stdout => [], :stderr => [], :status => true).once.returns(result)
Executable.execute_command(cmd, '', true)
end
end end
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment