Skip to content

Commit

Permalink
Test and documentation for issue #1694
Browse files Browse the repository at this point in the history
  • Loading branch information
marcboquet committed Mar 29, 2014
1 parent e44da0d commit 9a4e304
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Expand Up @@ -2,6 +2,15 @@

To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides/installing_cocoapods.html).

## Master
[CocoaPods](https://github.com/jverkoey/CocoaPods/compare/0.30.0...master)

###### Enhancements

* Unset the `CDPATH` env variable before shelling-out on `prepare_command`
[Marc Boquet](https://github.com/apalancat)
[#1943](https://github.com/CocoaPods/CocoaPods/pull/1943)

## 0.30.0
[CocoaPods](https://github.com/jverkoey/CocoaPods/compare/0.29.0...0.30.0)

Expand Down
4 changes: 4 additions & 0 deletions lib/cocoapods/installer/pod_source_installer.rb
Expand Up @@ -114,6 +114,10 @@ def download_source

# Runs the prepare command bash script of the spec.
#
# @note Unsets the `CDPATH` env variable before running the
# shell script to avoid issues with relative paths
# (issue #1694).
#
# @return [void]
#
def run_prepare_command
Expand Down
7 changes: 7 additions & 0 deletions spec/unit/installer/pod_source_installer_spec.rb
Expand Up @@ -83,6 +83,13 @@ module Pod
@installer.install!
end.message.should.match /command not found/
end

it "unsets $CDPATH environment variable" do
ENV['CDPATH'] = "BogusPath"
@spec.prepare_command = "cd Classes;ls Banana.h"
lambda { @installer.install! }.should.not.raise
end

end

#--------------------------------------#
Expand Down

0 comments on commit 9a4e304

Please sign in to comment.