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

cmd/go: mod vendor nukes existing vendor directory #44646

Closed
tamird opened this issue Feb 26, 2021 · 6 comments
Closed

cmd/go: mod vendor nukes existing vendor directory #44646

tamird opened this issue Feb 26, 2021 · 6 comments
Labels
FrozenDueToAge GoCommand cmd/go NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.

Comments

@tamird
Copy link
Contributor

tamird commented Feb 26, 2021

Running go mod vendor in the presence of a directory called "vendor" is dangerous. In particular, if such a directory contains git repositories, they are unceremoniously deleted. It'd be nice to have a best-effort check in place before performing destructive operations. Perhaps if "vendor" exists but "vendor/modules.txt" does not, the command should issue a warning.

@seankhliao seankhliao changed the title cmd/go: mod vendor nukes git repositories cmd/go: mod vendor nukes existing vendor directory Feb 26, 2021
@seankhliao seankhliao added GoCommand cmd/go NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Feb 26, 2021
@seankhliao
Copy link
Member

possibly a duplicate of #26366 #44119

@bcmills

This comment has been minimized.

@bcmills bcmills marked this as a duplicate of #44646 Mar 22, 2021
@bcmills bcmills closed this as completed Mar 22, 2021
@tamird
Copy link
Contributor Author

tamird commented Mar 22, 2021

Seems you marked it a duplicate of itself.

@bcmills
Copy link
Contributor

bcmills commented Mar 23, 2021

Oops! Sorry, will fix.

@bcmills bcmills reopened this Mar 23, 2021
@bcmills
Copy link
Contributor

bcmills commented Mar 23, 2021

Duplicate of #44119

@bcmills bcmills marked this as a duplicate of #44119 Mar 23, 2021
@bcmills bcmills closed this as completed Mar 23, 2021
@matveynator
Copy link

Just nuked my two days work on the module....
Surprize!

@golang golang locked and limited conversation to collaborators Jan 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge GoCommand cmd/go NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

5 participants