You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@eyemyth Something you could try that would solve this for you in your setups is to use the vagrant-triggers plugin to put up a warning. I've done that here, and you're welcome to copy that snippet into your own project if you'd like:
# verify with user before allowing a rebuild to take placeconf.trigger.before:rebuilddoconfirm=niluntil["Y","y","N","n"].include?(confirm)puts"The rebuild command is a potentially destructive operation. All data on the VM will be erased!"confirm=ask"Are you sure you want to rebuild the VM? [y/N] "endexitunlessconfirm.upcase == "Y"end
Damn! Just accidently lost a droplet too :(
Restored from 3-days ago backup but anyway too dangerous operation.
And btw I was trying just to see a command help
vagrant rebuild --help
So I got help message and command rebuild executed right after it. So first of my hosts has been lost immediately without any prompt. And I am completely disagree about this is nice-to-have feature - it should be must-have mandatory feature.
@davidalger script is very useful but no doubts it should be default behaviour without any additional scripts.
I just lost a droplet to 'vagrant rebuild'. It should provide the same confirmation as the usual 'vagrant destroy'.
Luckily the droplet I accidentally destroyed wasn't super important.
The text was updated successfully, but these errors were encountered: