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

pod repo update should unset GIT_DIR before running git operations #7958

Closed
1 task done
lilyball opened this issue Jul 27, 2018 · 1 comment · Fixed by #8549
Closed
1 task done

pod repo update should unset GIT_DIR before running git operations #7958

lilyball opened this issue Jul 27, 2018 · 1 comment · Fixed by #8549
Labels
d1:easy An easy ticket that is a good start for first-time contributors s2:confirmed Issues that have been confirmed by a CocoaPods contributor t2:defect These are known bugs. The issue should also contain steps to reproduce. PRs welcome!
Milestone

Comments

@lilyball
Copy link

Report

What did you do?

I updated my Podfile and ran pod update someDep from within a git rebase operation, which triggered a pod repo update.

What did you expect to happen?

This should have updated the cocoapods repo.

What happened instead?

Because I was in the middle of a git rebase, the GIT_DIR environment variable was set. This made CocoaPods's git fetch operation actually apply the operation to my local repo instead of the cocoapods spec repo.

Notes

The GIT_DIR environment variable should be unset, but there's probably others that need to be unset too.

@segiddins segiddins added t2:defect These are known bugs. The issue should also contain steps to reproduce. PRs welcome! d1:easy An easy ticket that is a good start for first-time contributors s2:confirmed Issues that have been confirmed by a CocoaPods contributor labels Jul 30, 2018
@segiddins
Copy link
Member

Should be fairly easy to do, just by wrapping the git operations done in the source manager in a block that saves the ENV, unsets the git stuff, runs the fetch, and then restores

tripleCC added a commit to tripleCC/CocoaPods that referenced this issue Feb 24, 2019
@dnkoutso dnkoutso added this to the 1.7.0 milestone Feb 24, 2019
tripleCC added a commit to tripleCC/CocoaPods that referenced this issue Mar 1, 2019
dnkoutso added a commit that referenced this issue Mar 2, 2019
Fix: unset GIT_DIR and GIT_WORK_TREE for git operations #7958
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
d1:easy An easy ticket that is a good start for first-time contributors s2:confirmed Issues that have been confirmed by a CocoaPods contributor t2:defect These are known bugs. The issue should also contain steps to reproduce. PRs welcome!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants