Commit 91e055e9 authored by Fabio Pelosin's avatar Fabio Pelosin

Merge pull request #2215 from tapi/2181-init-search

[init] Changes the check used to determine if a Podfile already exists.
parents fe0698c5 9510a445
...@@ -29,6 +29,11 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides ...@@ -29,6 +29,11 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
[Fabio Pelosin][irrationalfab] [Fabio Pelosin][irrationalfab]
[Core#132](https://github.com/CocoaPods/Core/issues/132) [Core#132](https://github.com/CocoaPods/Core/issues/132)
* Fixed `pod init` so that it doesn't recurse when checking for Podfiles.
[Paddy O'Brien](tapi)
[#2181](https://github.com/CocoaPods/CocoaPods/issues/2181)
* Fixed missing XCTest framework in Xcode 6 * Fixed missing XCTest framework in Xcode 6
[Paul Williamson](squarefrog) [Paul Williamson](squarefrog)
[#2296](https://github.com/CocoaPods/CocoaPods/issues/2296) [#2296](https://github.com/CocoaPods/CocoaPods/issues/2296)
...@@ -481,7 +486,7 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides ...@@ -481,7 +486,7 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
[Joshua Kalpin](https://github.com/Kapin) [Joshua Kalpin](https://github.com/Kapin)
[Core#39](https://github.com/CocoaPods/Core/pull/39) [Core#39](https://github.com/CocoaPods/Core/pull/39)
[#1610](https://github.com/CocoaPods/CocoaPods/issues/1610) [#1610](https://github.com/CocoaPods/CocoaPods/issues/1610)
* Having the silent flag enabled in the config will no longer cause issues * Having the silent flag enabled in the config will no longer cause issues
with `pod search`. In addition, the flag `--silent` is no longer supported with `pod search`. In addition, the flag `--silent` is no longer supported
for the command. for the command.
...@@ -505,9 +510,9 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides ...@@ -505,9 +510,9 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
[Carson McDonald](https://github.com/carsonmcdonald) [Carson McDonald](https://github.com/carsonmcdonald)
[#1628](https://github.com/CocoaPods/CocoaPods/issues/1628) [#1628](https://github.com/CocoaPods/CocoaPods/issues/1628)
* Fixed all issues caused by `/tmp` being a symlink to `/private/tmp`. * Fixed all issues caused by `/tmp` being a symlink to `/private/tmp`.
This affected mostly `pod lib lint`, causing it to fail when the This affected mostly `pod lib lint`, causing it to fail when the
Pod used `prefix_header_*` or when the pod headers imported headers Pod used `prefix_header_*` or when the pod headers imported headers
using the namespaced syntax (e.g. `#import <MyPod/Header.h>`). using the namespaced syntax (e.g. `#import <MyPod/Header.h>`).
[kra Larivain/OpenTable](https://github.com/opentable) [kra Larivain/OpenTable](https://github.com/opentable)
[#1514](https://github.com/CocoaPods/CocoaPods/pull/1514) [#1514](https://github.com/CocoaPods/CocoaPods/pull/1514)
...@@ -637,7 +642,7 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides ...@@ -637,7 +642,7 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
[Noah McCann](https://github.com/nmccann) [Noah McCann](https://github.com/nmccann)
[#29](https://github.com/CocoaPods/Core/pull/29) [#29](https://github.com/CocoaPods/Core/pull/29)
* The developer dir relative to the SDK is not added anymore if testing * The developer dir relative to the SDK is not added anymore if testing
frameworks are detected in OS X targets, as it doesn't exists, avoiding the frameworks are detected in OS X targets, as it doesn't exists, avoiding the
presentation of the relative warning in Xcode. presentation of the relative warning in Xcode.
[Fabio Pelosin](https://github.com/irrationalfab) [Fabio Pelosin](https://github.com/irrationalfab)
...@@ -797,7 +802,7 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides ...@@ -797,7 +802,7 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
* Added `pod init` command which generates a Podfile according to the * Added `pod init` command which generates a Podfile according to the
targets of the project stored in the working directory and to the templates targets of the project stored in the working directory and to the templates
stored in the `~/.cocoapods/templates` folder. Two templates are supported: stored in the `~/.cocoapods/templates` folder. Two templates are supported:
- the `Podfile.default` template for regular targets. - the `Podfile.default` template for regular targets.
- and the `Podfile.test` template for test targets. - and the `Podfile.test` template for test targets.
[Ian Ynda-Hummel](https://github.com/ianyh) [Ian Ynda-Hummel](https://github.com/ianyh)
......
...@@ -30,7 +30,7 @@ module Pod ...@@ -30,7 +30,7 @@ module Pod
def validate! def validate!
super super
raise Informative, "Existing Podfile found in directory" unless config.podfile.nil? raise Informative, "Existing Podfile found in directory" unless config.podfile_path_in_dir(Pathname.pwd).nil?
if @project_path if @project_path
help! "Xcode project at #{@project_path} does not exist" unless File.exist? @project_path help! "Xcode project at #{@project_path} does not exist" unless File.exist? @project_path
project_path = @project_path project_path = @project_path
......
...@@ -320,6 +320,8 @@ module Pod ...@@ -320,6 +320,8 @@ module Pod
'Podfile', 'Podfile',
] ]
public
# Returns the path of the Podfile in the given dir if any exists. # Returns the path of the Podfile in the given dir if any exists.
# #
# @param [Pathname] dir # @param [Pathname] dir
......
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