Repository navigation
Conversation
Contributor
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Invoke-Expression runs the script's param block as plain variable declarations, so the [ValidateSet] on -Platform was applied to the empty default and aborted the documented one-liner with "The attribute cannot be added because variable Platform with value would no longer be valid." Validate -Platform by hand after the param block instead. The nightly install smoke only ran the scriptblock form (which binds parameters normally), so add a Windows PowerShell 5.1 step that runs the literal `irm | iex` one-liner. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EwoutH
force-pushed
the
bugfix/install-ps1-iex
branch
from
November 7, 2026 12:11
2c5b17c to
fa3bbed
Compare
Member
|
I'm going to let @cderv handle the review on this one. |
This branch has not been deployed
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
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.
The documented Windows one-liner fails before installing anything:
Cause
Invoke-Expressiondoesn't run the text as a script with parameters; theparam(...)block executes as ordinary variable declarations. The[ValidateSet('windows_amd64', 'windows_arm64')]on-Platform(added in v0.38.0) is then attached to a variable whose value is empty, which the set rejects. Minimal repro:CI didn't catch it because the nightly install smoke uses the scriptblock form (
& ([scriptblock]::Create((irm …))) -Nightly), which binds parameters normally.Changes
install.ps1: drop the[ValidateSet]and validate-Platformby hand afterDieis defined, with the same accepted values and a clear error.nightly.yml: add an install-smoke step (Windows PowerShell 5.1) that runs the literalirm … | iexone-liner. It installs the latest stable release to the default%USERPROFILE%\.local\binand checks thatq2.exe --versionruns.Verification (Windows 11, Windows PowerShell 5.1)
Get-Content -Raw install.ps1 | Invoke-Expression(withUSERPROFILEpointed at a scratch dir): installs v0.42.0, checksum verified,q2 (quarto 2) 0.42.0.-Platform bogusvia the scriptblock form:q2 install: unknown -Platform 'bogus' (expected windows_amd64 or windows_arm64).-Platform windows_amd64 -Dest <dir>via the scriptblock form: installs normally.Until this lands, the workaround is
& ([scriptblock]::Create((irm https://raw.githubusercontent.com/quarto-dev/q2/main/install.ps1))).