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>
* 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>
* chore: update to stable toolchain. apply clippy fixes & rustfmt
* Bump MSRV
* Try MSRV without the patch version
* fix: pin toolchain to MSRV
* trying again
* fix dead code warning
---------
Co-authored-by: Dan Sully <dsully@users.noreply.github.com>
* feat(microsoft_store): Add Microsoft Store step for Windows
Add Microsoft Store Apps update step for Windows as Winget cannot update all Microsoft Store apps yet.
Closes#912
* style(translation): modify `zh_TW` translation
* feat: initial i18n setup
* style: fmt
* feat: i18n support for new steps
* fix: build on Linux
* fix: build on Linux
* refactor: rm unused translation keys
---------
Co-authored-by: Steve Lau <stevelauc@outlook.com>
* chore: improve Windows Update step and add PSWindowsUpdate Module
Refactor the `windows_update` function in `windows.rs` to improve the Windows Update step. Added a prompt for administrator privileges and updated the warning message. Also, added support for installing the PSWindowsUpdate Module as an alternative to using USOClient for Windows Update.
still see warning:
The installer will request to run as administrator, expect a prompt.
Start-Process : A parameter cannot be found that matches parameter name 'Command'.
At line:1 char:74
+ ... ath powershell -Verb runAs -ArgumentList -NoProfile -Command Import- ...
+ ~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Start-Process], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.StartProcessCommand
VERBOSE: MSI-THIN-GF36 (6/30/2024 4:48:48 PM): Connecting to Microsoft Update server. Please wait...
VERBOSE: Found [0] Updates in pre search criteria
but as the verbose shows it works
* trying
* fix
* Don't show desktop notification on error (if `skip_notify = true`) (#275)
* Use ─ (U+2500) to draw borders (#282)
* Adds Pclinuxos support (#283)
* Add Devkitpro Pacman support (#291)
* Added support for Neovim package manager lazy.nvim (#293)
* Added support for lazy.nvim
From https://github.com/folke/lazy.nvim
Authored-by: Jacob Lane Ledbetter <jledbetter460@gmail.com>
* Make garuda-update update AUR packages by default (#296)
* fix(#298): Don't throw error if no Helm repository found (#305)
* Skip .NET when `dotnet tool list` is not successful (#302)
* feat(pacstall): add `-y` flag variant (#312)
* Add openSUSE MicroOS support (#315)
* Adds notify-send timeout of 10s (#318)
* Don't run yum when rpm-ostree is available (#313)
* don't run yum when rpm-ostree is available
* Clippy fix
* rpm-ostree: set default value to true
* Fixes if loop error
* Fixes gem update --system requires sudo now (#317)
* Fixes gem update --system requires sudo now
* rubygem: Adds arg -EH to sudo
* Use fixed nala path instead of which(nala) (#314)
* Adds notify-send bug warning when topgrade is run (#324)
* Adds notify-send bug warning when topgrade is run
* fix typo + clippy
* notify-send warning respects skip_notify flag
* nix: Adds additional arguments support (#325)
* Adds pip-review and pipupgrade support (#316)
* Adds pip-review and pipupgrade support
* Python: fixes pip_review and pipupgrade
* v10.2.5 patch (#329)
* WSL: Adds new wsl --update flags (#327)
* wsl: Updates available flags
* Clippy fix
* Add WslUpdate runner
* wsl: Code Typo
* wsl: Code Typos
* wsl: Code Typos
* wsl: Code Typo
* Adds AM Package Manager (#328)
* Adds AM Package Manager
* Clippy fixes
* Cargo fmt
* Moves am to linux only in main file
---------
Co-authored-by: Guilherme Silva <626206+guihkx@users.noreply.github.com>
Co-authored-by: Gabriel Augendre <gabriel@augendre.info>
Co-authored-by: Cat Core <34719527+arthurbambou@users.noreply.github.com>
Co-authored-by: Hugo Haas <hugoh@hugoh.net>
Co-authored-by: Baptiste <32563450+BapRx@users.noreply.github.com>
Co-authored-by: bbx0 <39773919+bbx0@users.noreply.github.com>
Co-authored-by: Sourajyoti Basak <wiz28@protonmail.com>
* Quote arguments when executing in a shell
Fixes#107
* Parse quotes in `tmux_arguments`
This makes it possible to encode spaces in arguments. Maybe the config
value should be an array instead?
* Print error causes
Co-authored-by: Thomas Schönauer <37108907+DottoDev@users.noreply.github.com>