-
Notifications
You must be signed in to change notification settings - Fork 9
feat: Add MSI install tests for winget and msiexec #49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 tasks
Script Analysis
Security Review
Optimization Suggestions
Overall Quality: 4 (Well-structured tests with minor security and performance improvements needed) Recommended improvements:
|
hustcer
added a commit
to nushell/nushell
that referenced
this pull request
May 22, 2025
<!-- if this PR closes one or more issues, you can automatically link the PR with them by using one of the [*linking keywords*](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword), e.g. - this PR should close #xxxx - fixes #xxxx you can also mention related issues, PRs or discussions! --> # Description <!-- Thank you for improving Nushell. Please, check our [contributing guide](../CONTRIBUTING.md) and talk to the core team before making major changes. Description of your pull request goes here. **Provide examples and/or screenshots** if your changes affect the user experience. --> Publishing Nushell to winget has always been a challenge for us, and to this day, many issues remain unresolved—and some seem almost impossible to fix. The road to solving these problems may be winding and long, but it's time for us to set out on this journey. This PR try to fix the Windows arm64 release binaries and some `winget` related issues: - [x] Fixes #14815: build Windows arm64 binaries by Windows arm64 runner - [x] Upgrade WiX Toolset to latest 6.0 version: WiX 3 we used currently doesn't support arm64 arch and [WiX v4 Security Fixes End Date is 2025/02/05](https://docs.firegiant.com/wix/) - [x] Update the **nightly** workflow to make it work for all future releases - [x] Update the **release** workflow to make it work for all future releases - [x] Fixes #15698 - [x] Fixes #13719 so that Nushell should be possible to be installed via winget with both user and machine scope - [x] Fixes #5927 - [x] Try to fix #14786 - [x] Fixes #9537 ## Related but not planed issues: - Related #13017 - Related #8053 # User-Facing Changes <!-- List of all changes that impact the user experience here. This helps us keep track of breaking changes. --> - Nushell should be possible to be installed via winget with both user and machine scope and The default should be user scope - User scope install by winget: `winget install Nushell.Nushell` - User scope install by msiexec: `msiexec /i nu-0.104.1-x86_64-pc-windows-msvc.msi /quiet /qn` - Machine scope install by winget: `winget install Nushell.Nushell --override 'ALLUSERS=1'` - Machine scope install by msiexec: `msiexec /i nu-0.104.1-x86_64-pc-windows-msvc.msi ALLUSERS=1` - Note that `--scope` flag for `winget install` does not work use `--override` instead - Default user scope install dir: `$'($nu.home-path)\AppData\Local\Programs\nu\'` - Default machine scope install dir: `C:\Program Files\nu\` - When a standard user runs the installer and selects "Install for everyone" (per-machine installation), Windows will automatically trigger a UAC prompt, the user can enter admin credentials and the installation will proceed with elevated privileges - [hustcer/setup-nu](https://github.com/hustcer/setup-nu) should work for `windows-11-arm` runners # Tests + Formatting <!-- Don't forget to add tests that cover your changes. Make sure you've run and fixed any issues with these commands: - `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used` to check that you're using the standard code style - `cargo test --workspace` to check that all tests pass (on Windows make sure to [enable developer mode](https://learn.microsoft.com/en-us/windows/apps/get-started/developer-mode-features-and-debugging)) - `cargo run -- -c "use toolkit.nu; toolkit test stdlib"` to run the tests for the standard library > **Note** > from `nushell` you can also use the `toolkit` as follows > ```bash > use toolkit.nu # or use an `env_change` hook to activate it automatically > toolkit check pr > ``` --> The latest MSI builds are available here: https://github.com/nushell/nightly/releases/tag/v0.104.1 Actually all the nightly releases were built with latest changes included: https://github.com/nushell/nightly/releases `winget` and `msiexec` install tests goes here: nushell/integrations#49 https://github.com/nushell/integrations/actions/runs/14974621061 https://github.com/nushell/integrations/actions/runs/14974621054 ### Test winget install locally: - git clone [email protected]:nushell/integrations.git - User scope install: `winget install -m manifests\n\Nushell\Nushell\0.104.1\` - Run: `use tests\common.nu *; check-user-install` - Machine scope install: `winget install -m manifests\n\Nushell\Nushell\0.104.1\ --override 'ALLUSERS=1'` - Run: `use tests\common.nu *; check-local-machine-install` # After Submitting <!-- If your PR had any user-facing changes, update [the documentation](https://github.com/nushell/nushell.github.io) after the PR is merged, if necessary. This will help us keep the docs up to date. --> @fdncred I suggest releasing a patch version after merging this PR (only the changes of this PR will be included) to ensure that the winget release process works properly. This way, we can be more confident when releasing version 0.105.0. References: - https://learn.microsoft.com/en-us/windows/win32/msi/single-package-authoring - https://learn.microsoft.com/en-us/windows/package-manager/winget/source#add - https://github.com/microsoft/winget-pkgs/blob/master/doc/tools/SandboxTest.md - https://docs.firegiant.com/quick-start/ - https://docs.firegiant.com/wix3/tutorial/getting-started/putting-it-to-use/#_top - https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/msiexec#set-public-properties
hustcer
added a commit
to nushell/nushell
that referenced
this pull request
May 22, 2025
<!-- if this PR closes one or more issues, you can automatically link the PR with them by using one of the [*linking keywords*](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword), e.g. - this PR should close #xxxx - fixes #xxxx you can also mention related issues, PRs or discussions! --> <!-- Thank you for improving Nushell. Please, check our [contributing guide](../CONTRIBUTING.md) and talk to the core team before making major changes. Description of your pull request goes here. **Provide examples and/or screenshots** if your changes affect the user experience. --> Publishing Nushell to winget has always been a challenge for us, and to this day, many issues remain unresolved—and some seem almost impossible to fix. The road to solving these problems may be winding and long, but it's time for us to set out on this journey. This PR try to fix the Windows arm64 release binaries and some `winget` related issues: - [x] Fixes #14815: build Windows arm64 binaries by Windows arm64 runner - [x] Upgrade WiX Toolset to latest 6.0 version: WiX 3 we used currently doesn't support arm64 arch and [WiX v4 Security Fixes End Date is 2025/02/05](https://docs.firegiant.com/wix/) - [x] Update the **nightly** workflow to make it work for all future releases - [x] Update the **release** workflow to make it work for all future releases - [x] Fixes #15698 - [x] Fixes #13719 so that Nushell should be possible to be installed via winget with both user and machine scope - [x] Fixes #5927 - [x] Try to fix #14786 - [x] Fixes #9537 - Related #13017 - Related #8053 <!-- List of all changes that impact the user experience here. This helps us keep track of breaking changes. --> - Nushell should be possible to be installed via winget with both user and machine scope and The default should be user scope - User scope install by winget: `winget install Nushell.Nushell` - User scope install by msiexec: `msiexec /i nu-0.104.1-x86_64-pc-windows-msvc.msi /quiet /qn` - Machine scope install by winget: `winget install Nushell.Nushell --override 'ALLUSERS=1'` - Machine scope install by msiexec: `msiexec /i nu-0.104.1-x86_64-pc-windows-msvc.msi ALLUSERS=1` - Note that `--scope` flag for `winget install` does not work use `--override` instead - Default user scope install dir: `$'($nu.home-path)\AppData\Local\Programs\nu\'` - Default machine scope install dir: `C:\Program Files\nu\` - When a standard user runs the installer and selects "Install for everyone" (per-machine installation), Windows will automatically trigger a UAC prompt, the user can enter admin credentials and the installation will proceed with elevated privileges - [hustcer/setup-nu](https://github.com/hustcer/setup-nu) should work for `windows-11-arm` runners <!-- Don't forget to add tests that cover your changes. Make sure you've run and fixed any issues with these commands: - `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used` to check that you're using the standard code style - `cargo test --workspace` to check that all tests pass (on Windows make sure to [enable developer mode](https://learn.microsoft.com/en-us/windows/apps/get-started/developer-mode-features-and-debugging)) - `cargo run -- -c "use toolkit.nu; toolkit test stdlib"` to run the tests for the standard library > **Note** > from `nushell` you can also use the `toolkit` as follows > ```bash > use toolkit.nu # or use an `env_change` hook to activate it automatically > toolkit check pr > ``` --> The latest MSI builds are available here: https://github.com/nushell/nightly/releases/tag/v0.104.1 Actually all the nightly releases were built with latest changes included: https://github.com/nushell/nightly/releases `winget` and `msiexec` install tests goes here: nushell/integrations#49 https://github.com/nushell/integrations/actions/runs/14974621061 https://github.com/nushell/integrations/actions/runs/14974621054 - git clone [email protected]:nushell/integrations.git - User scope install: `winget install -m manifests\n\Nushell\Nushell\0.104.1\` - Run: `use tests\common.nu *; check-user-install` - Machine scope install: `winget install -m manifests\n\Nushell\Nushell\0.104.1\ --override 'ALLUSERS=1'` - Run: `use tests\common.nu *; check-local-machine-install` <!-- If your PR had any user-facing changes, update [the documentation](https://github.com/nushell/nushell.github.io) after the PR is merged, if necessary. This will help us keep the docs up to date. --> @fdncred I suggest releasing a patch version after merging this PR (only the changes of this PR will be included) to ensure that the winget release process works properly. This way, we can be more confident when releasing version 0.105.0. References: - https://learn.microsoft.com/en-us/windows/win32/msi/single-package-authoring - https://learn.microsoft.com/en-us/windows/package-manager/winget/source#add - https://github.com/microsoft/winget-pkgs/blob/master/doc/tools/SandboxTest.md - https://docs.firegiant.com/quick-start/ - https://docs.firegiant.com/wix3/tutorial/getting-started/putting-it-to-use/#_top - https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/msiexec#set-public-properties
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
feat: Add MSI install tests for winget and msiexec, Related PR: nushell/nushell#15690