logoalt Hacker News

mycalltoday at 1:56 AM4 repliesview on HN

I like the opposite too, -commit or -execute as it is assumed running it with defaults is immutable as the dry run, simplifying validation complexity and making the go live explicit.


Replies

spike021today at 4:45 AM

There was a tool I used some time ago that required typing in a word or phrase to acknowledge that you know it's doing the run for real.

Pros and cons to each but I did like that because it was much more difficult to fat finger or absentmindedly use the wrong parameter.

Twirrimtoday at 2:20 AM

I've biased towards this heavily in the last 8 or so years now.

I've yet to have anyone mistakenly modify anything when they need to pass --commit, when I've repeatedly had people repeatedly accidentally modify stuff because they forgot --dry-run.

show 1 reply
xyse53today at 2:23 AM

Yeah I'm more of a `--wet-run` `-w` fan myself. But it does depend on how serious/annoying the opposite is.

show 1 reply
lazidetoday at 4:34 AM

Just don’t randomly mix and match the approaches or you are in for a bad time.