-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash when :path
is nil
#3320
Comments
Can you please share the crash report? |
Absolutely. Error
I can't post the whole Podfile, but here's the line that offends:
When
But that clutters the file a great deal, and there are a lot of pods we could do this for. Basically, I think the if branch should work whether or not the environment variable is set. If I'm not off my rocker with that behavior, I'm happy to contribute to the project to make it work. Thanks for CocoaPods! |
I think we can safely compact that hash to remove empty entries, just needed to know where to look! Thanks for the bug report -Samuel E. Giddins On Mar 27, 2015, at 8:33 AM, Ethan Garofolo notifications@github.com wrote: Absolutely. Error TypeError - no implicit conversion of nil into String I can't post the whole Podfile, but here's the line that offends: pod '', :path => ENV['SOME_ENV_VAR'] When ENV['SOME_ENV_VAR'] is set, everything works just fine. As mentioned, I can work around this by putting a guard around the pod call, something like: if ENV['SOME_ENV_VAR'] Thanks for CocoaPods! — |
You're very welcome. Thanks for the speedy response! |
@juanpaco this was just fixed in CocoaPods/Core master. |
@segiddins Wow. Talk about fast turn around. Thanks a bunch! Y'all do great work. |
Hello. I'm new to cocoapods, so you have my apologies if this is a duplicate or if I'm going about this wrong.
In my project we have a number of pods specified. Sometimes we need to work on the pods themselves in the context of the larger app. I know this can be achieved by putting
:path => '/path/to/pod'
to get a local working copy of the pod. This has the drawback in that now I've modified the Podfile, and it's easy to forget to not check that back into source control.I can use environment variables when I run
pod install
, and they get picked up inside of the Podfile just fine. The trouble is that I have to do a bunch of if/else logic, because if I have something like:pod 'awesome_pod', '1.0.0', :path => ENV['AWESOME_POD_PATH']
and I haven't set
AWESOME_POD_PATH
when I run it, I get a crash during thepod install
process.I would expect it to just ignore
:path
beingnil
in this case, so that it would go to the normal installation location. Since it doesn't, I have to clutter my Podfile with a check to make sure I have the env variable, whose else clause has the pod declaration without the path key.Does anyone else experience this problem? Should it ignore a nil path? I'm happy to submit a PR to make it work this way if this behavior is desired.
The text was updated successfully, but these errors were encountered: