12 ms·
Scenario: I write a powershell script and use it for years. Then, I read a question from somebody in "the other 80%". I want to help the other 80%, so I send hi
by Someone 11y ago
Scenario: I write a powershell script and use it for years. Then, I read a question from somebody in "the other 80%". I want to help the other 80%, so I send him my script, explaining that it will show what it does and ask for confirmation before it actually does something.
He runs it; the script starts deleting files/sending emails/downloading files over expensive gsm connection without asking for confirmation.
After some angry words, I discover that the command line flag '-d' for 'dry run' means 'do it now without asking for confirmation' in another locale.
From another reply, it seems one can guard against that by running under the invariant culture, but I don't think one should require everybody who writes a script to be that vigilant.
If you aren't convinced try googling for help on writing VBA macros in localized version of Excel or Word.