-
Notifications
You must be signed in to change notification settings - Fork 120
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
coba-cli overwrites existing main.go with no warning #59
Labels
Comments
This issue is being marked as stale due to a long period of inactivity |
larsks
added a commit
to larsks/cobra-cli
that referenced
this issue
Feb 3, 2023
Running `cobra-cli init` or `cobra-cli add` would overwrite existing files without warning, which could result in unexpected loss of data. This commit modifies cobra-cli so that by default it will not overwrite files, and adds the `--force` flag to the `init` and `add` subcommands to allow it to overwrite files. Closes spf13#59
larsks
added a commit
to larsks/cobra-cli
that referenced
this issue
Feb 3, 2023
Running `cobra-cli init` or `cobra-cli add` would overwrite existing files without warning, which could result in unexpected loss of data. This commit modifies cobra-cli so that by default it will not overwrite files, and adds the `--force` flag to the `init` and `add` subcommands to allow it to overwrite files. Closes spf13#59
This issue is being marked as stale due to a long period of inactivity |
This issue is being marked as stale due to a long period of inactivity |
larsks
added a commit
to larsks/cobra-cli
that referenced
this issue
Jun 3, 2023
Running `cobra-cli init` or `cobra-cli add` would overwrite existing files without warning, which could result in unexpected loss of data. This commit modifies cobra-cli so that by default it will not overwrite files, and adds the `--force` flag to the `init` and `add` subcommands to allow it to overwrite files. Closes spf13#59
I closed the associated PR back in April; just closing this issue as well. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When run in an existing project,
cobra-cli init
will silently overwrite an existingmain.go
.In this situation,
cobra-cli
should emit an error and exit without making changes rather than overwriting existing code.The text was updated successfully, but these errors were encountered: