Commit 07257721 authored by Samuel E. Giddins's avatar Samuel E. Giddins

Merge pull request #3181 from CocoaPods/developer-tools-path-contains-spaces

Support for spaces in full path to executables.
parents c64bd68b 5b68d785
......@@ -113,6 +113,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[Kyle Fuller](https://github.com/kylef)
[#3134](https://github.com/CocoaPods/CocoaPods/issues/3134)
* Fixes an issue with spaces in the path to the user's developer tools.
[Boris Bügling](https://github.com/neonichu)
[#3181](https://github.com/CocoaPods/CocoaPods/issues/3181)
## 0.36.0.beta.2
......
......@@ -52,8 +52,9 @@ module Pod
raise Informative, "Unable to locate the executable `#{executable}`" if bin.empty?
require 'open4'
require 'shellwords'
full_command = "#{bin} #{command}"
full_command = "#{bin.shellescape} #{command}"
if Config.instance.verbose?
UI.message("$ #{full_command}")
......
......@@ -9,5 +9,15 @@ module Pod
end.should.raise Informative
e.message.should.match(/false/)
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('/Spa\\ ces/are\\"/fun/false ', :stdout => [], :stderr => [], :status => true).once.returns(result)
Executable.execute_command(cmd, '', true)
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