3 ms·
If you're doing a lot of modifications to a filesystem or a database, one pattern I've used and liked in the past is to have your code simply dump out the comma
by deckard1 5y ago
If you're doing a lot of modifications to a filesystem or a database, one pattern I've used and liked in the past is to have your code simply dump out the commands to run. Usually to stdout and you save it as a script.
That way you don't need to worry about issues with bugs in the dry run logic and you have a record (a script) of what you actually ran.
Even better if you can extend this output script so that it's idempotent and fails on the first failed command.