-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
ignite generate can overwrite existing files #1120
Comments
Ouch! That hurts. We currently rely on the app developer to add an https://github.com/infinitered/ignite/blob/master/src/extensions/ignite/copyBatch.js#L31 Perhaps we should default to Important: If we do decide to default to const askToOverwrite = (config.askToOverwrite !== undefined) ? config.askToOverwrite : true Additionally, you might need to update our integration tests so they don't get hung up on this during CI builds. |
I've got a very good commit workflow, this typically couldn't arrive to me BUT, I'm sure a default with askToOverwrite is the way to do it. |
The intention was to be We should add You can add |
So, just to confirm, I should have something like this?
|
@dustinromey Yes, exactly. (Sorry about the late response here). We should probably default to |
Done! https://github.com/infinitered/ignite-ir-boilerplate/pull/121 Hope that fits the bill. I'm mostly a solo coder so not intimately familiar with all the git-foo and good manners. Thanks for a great project. Its helped me not only advance my project, but also really grasp RN, redux, redux-sagas, and a whole bunch of other tech. I can't praise you guys enough for sharing it so widely and readily. |
Pull request was merged. Seems like this issue can be closed. |
@dustinromey Awesome, thanks for the kind words and for contributing! |
What's going on?
Accidentally re-ran an
ignite generate container
command. If there's a container already there with that name, it overwrites the file.Yes, it was too long between commits. Too long between TimeMachine backups, etc. No I wasn't paying enough attention to what I did in Terminal, etc., etc., etc.
Steps to reproduce
ignite generate container MyCoolNewContainer
Now go edit the container file.
ignite generate container MyCoolNewContainer
You'll find the boilerplate is now in the file.
Suggestion:
Can we get an "Are you sure" if the file name already exists? Or maybe copy the files to FileName-orig.js?
The text was updated successfully, but these errors were encountered: