When topgrade is run from within pwsh, the execution policy check breaks
for the Windows Update and Windows Store steps, because they use normal
powershell and the inherited PSModulePath environment variable breaks
the Microsoft.PowerShell.Security module import. So we unset that
variable to fix the issue, but also allow for those steps to use pwsh as
neither step actually requires PowerShell 5.
Co-authored-by: nistee <52573120+niStee@users.noreply.github.com>
Before this change, the spelling was inconsistent. Now it is consistent and follows the upstream spelling. GNOME is spelled all caps, because it is a trademark. (As an exception, it is spelled all lowercase in technical strings, such as identifiers and commands)
* Fix vscodium skipping silently
* Deduplicate
* Format
* Fix x.x.0 version crashing
* Error instead of skipping when there is no first version line
* Format
* fix(powershell): update command arguments to include execution policy
* fix(powershell): format command arguments for better readability
* fix(powershell): refactor command arguments for Windows execution policy and common options
* fix(powershell): improve execution policy handling and refactor argument passing
* refactor(powershell): streamline command execution and improve profile handling
* fix(powershell): improve code formatting for better readability and maintainability
* fix(powershell): enhance argument validation for improved error handling
* refactor(powershell): simplify Powershell struct methods and enhance command preparation
* refactor(powershell): streamline command building and enhance argument handling
* refactor(powershell): change add_common_args to use instance method for better encapsulation
* refactor(powershell): enhance command building by introducing build_command method and improving argument handling
* refactor(powershell): update build_command return type to match executor.execute() output
* refactor(powershell): refactor command building by introducing build_command_internal and adding profile getter
* refactor(powershell): improve profile retrieval and command execution logic
* refactor(powershell): add support for Windows update and Microsoft Store commands
* refactor(powershell): change args method to arg for accepting all Windows updates
* refactor(powershell): change arg method to args for accepting all Windows updates
* refactor(powershell): change args method to arg for accepting all Windows updates
* refactor(powershell): streamline command construction for Windows updates
* refactor(powershell): update args method for has_module function
* refactor(powershell): improve execution policy handling and command construction for Windows updates
* refactor(powershell): update Microsoft Store update command execution and streamline output handling
* refactor(powershell): clean up whitespace and improve code readability in execution policy checks
---------
Co-authored-by: nistee <lo9s4b7qp@mozmail.com>