Skip to content
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

run different command error, because Pod::Config is a singleton. #8284

Closed
1 task done
yishuiliunian opened this issue Nov 16, 2018 · 1 comment
Closed
1 task done

Comments

@yishuiliunian
Copy link

yishuiliunian commented Nov 16, 2018

Report

What did you do?

I use cocoapods as a gem lib. and define two Pod::Command subclass. first package an pospec, anthor publish a podspec.

when i run the two command, the second one is always break magical. Then i checkout the source of cocoapods. And i found the first one share the Pod::Config with the second one. But it is not i wanted.

The first pollute the second enviroment.

What did you expect to happen?

two command run correct. and do not use singleton with Pod::Config

What happened instead?

the second one crash!

CocoaPods Environment


### Stack

```
   CocoaPods : 1.5.3
        Ruby : ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin18]
    RubyGems : 2.7.6
        Host : Mac OS X 10.14 (18A391)
       Xcode : 10.0 (10A255)
         Git : git version 2.17.1 (Apple Git-112)
@segiddins
Copy link
Member

You can use Pod::Config.instance.with_changes({}) to scope changes to the config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants