platyPS
platyPS copied to clipboard
Support for -WhatIf
Because many of the commands in this module are changing state, shouldn't they support -WhatIf? Personally, I find this very important when creating external help to make sure I haven't made a mistake anywhere.
Yes, always good to have -WhatIf
. :)
At the same time, the recommended workflow is to version-control module and a documentation (together). When you do it, you don't really need -WhatIf
, because you can always checkout previous state. More then that, you get much better understanding of "What changed", once you apply the change.
For example, there could be bugs in Update-MarkdownHelp
logging logic (i.e. #165). But, if you version control the doc, you will get a reliable info from the diff, without the log.
I understand all of that. I am trying to maintain consistency, especially for IT Pros using PowerShell. I get discouraged when I train and explain -Whatif, only to discover commands that ignore the paradigm. Yes, version control is ideal but that shouldn't replace the fundamental nature of how people use PowerShell commands, or at least expect them to behave.
This is implemented in Microsoft.PowerShell.PlatyPS v1.