Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

IMO any script that makes any real changes (either to the local system or remotely) should take some kind of input.

It's one thing if your script reads some stuff and prints output. Defaulting to the current working directory (or whatever makes sense) is fine.

If the script is reading config from a config file or envvars then it should still probably get some kind of confirmation if it's going to make any kind of change (of course with an option to auot-confirm via a flag like --yes).

For really destructive changes it should default to dry run and require an explicit —-execute flag but for less destructive changes I think a path as input on the command line is enough confirmation.

That being said, if it’s an unknown script I’d just read it. And if it’s a binary I’d pass —-help.



Thanks for the reply! I really appreciate being able to pick other folks' brains on here :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: