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

coba-cli overwrites existing main.go with no warning #59

Closed
larsks opened this issue Dec 1, 2022 · 4 comments
Closed

coba-cli overwrites existing main.go with no warning #59

larsks opened this issue Dec 1, 2022 · 4 comments

Comments

@larsks
Copy link

larsks commented Dec 1, 2022

When run in an existing project, cobra-cli init will silently overwrite an existing main.go.

In this situation, cobra-cli should emit an error and exit without making changes rather than overwriting existing code.

@github-actions
Copy link

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
@github-actions
Copy link

github-actions bot commented Apr 3, 2023

This issue is being marked as stale due to a long period of inactivity

@github-actions
Copy link

github-actions bot commented Jun 3, 2023

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
@larsks
Copy link
Author

larsks commented Jun 3, 2023

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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant