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)
* refactor(parse_os_release): Don't rely on specific `ID`s for Fedora Immutable
Instead match `ID=fedora` or `ID_LIKE=fedora` and decide wether or not
the distro is immutable by `VARIANT`.
* feat: add aurora,bluefin,coreos support
The `os_release`s came from the following images:
- ghcr.io/ublue-os/aurora:93f0fd9f20b3
- ghcr.io/ublue-os/bluefin:5d37394a5d4b
- ghcr.io/ublue-os/ucore:63cd1200c344
* fix: bazzite should be detected as FedoraImmutable
* squash me: cargo fmt
---------
Co-authored-by: Steve Lau <stevelauc@outlook.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(bootc): add Bootc support + docs
Co-authored-by: Steve Lau <stevelauc@outlook.com>
* docs(bootc): specify that itll supercede rpm-ostree if enabled :p
---------
Co-authored-by: Steve Lau <stevelauc@outlook.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
* Improve OpenBSD -CURRENT detection and Dry-run feedback
This commit improves the -CURRENT detection by way of parsing `/etc/motd`. This change is more future-proof as when OpenBSD nears a stable release, `uname` will temporarily report like -STABLE.
This commit *also* adds feedback if -CURRENT is found to make debugging this feature easier with `--dry-run`, or, just a regular run as well.
* Make OpenBSD step less talky and improve verbiage.
This commit removes the command flag feedback. This commit also swaps the output "update", for "upgrade", making this step closer to other steps for consistency.
Add support for Lix
Lix is a fork of Nix 2.18 focused on maintainability and user
experience. It has a different format for the version, to distinguish it
from CppNix:
$ nix --version
nix (Lix, like Nix) 2.91.0
See: <https://lix.systems/>
* 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>
feat(brew): use sudo if Homebrew owned by another user
On Linux, run "brew update" with sudo if the Homebrew installation directory
is owned by a different user. This is typically the user who installed
Homebrew, but can also be a dedicated user account. This change ensures that
Homebrew updates can proceed smoothly even when its directory ownership does
not match the current user's UID. Proper sudo configuration is assumed for
this to work properly.
* 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