Skip to content

docs: Fix PowerShell custom shell example for GitHub Actions - #7423

Merged
lucascolley merged 2 commits into
prefix-dev:mainfrom
pavelzw:docs/fix-pwsh-github-actions
Nov 2, 2026
Merged

lucascolley merged 2 commits into
prefix-dev:mainfrom
pavelzw:docs/fix-pwsh-github-actions

Conversation

@pavelzw

@pavelzw pavelzw commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

Description

Fixes prefix-dev/setup-pixi#198, prefix-dev/setup-pixi#78


Summary: TODO (human-written summary)

AI-generated details:

shell: pixi run pwsh -Command {0} never runs the script. GitHub Actions only adds .ps1 to the temporary script file when the shell command starts with pwsh. Without the extension, pwsh -Command <file> tries to start it as a native program, and .NET falls back to shell-execute (xdg-open). On most runners the step then passes without running anything, and on ubuntu-24.04-arm it errors. -File {0} fails on Windows because of the missing .ps1 extension.

Before:

shell: pixi run pwsh -Command {0}

After:

shell: pixi run pwsh -NoProfile -Command "Invoke-Expression (Get-Content -Raw '{0}')"

Verified on ubuntu x64/arm, macOS and Windows x64/arm in prefix-dev/setup-pixi#305 (tests now assert that the script actually ran and that failures propagate). Mirrors the README change there.

Checklist:

  • I've discussed the proposed changes with a maintainer.
  • I understand the purpose of my changes and how they interact with the greater system.
  • User-facing changes are documented and prose in the documentation has been written/edited/reviewed by hand.

@pavelzw
pavelzw marked this pull request as ready for review November 1, 2026 17:04
@pavelzw
pavelzw requested a review from lucascolley November 1, 2026 17:04
@lucascolley
lucascolley merged commit 6c4ad2e into prefix-dev:main Nov 2, 2026
38 checks passed
@pavelzw
pavelzw deleted the docs/fix-pwsh-github-actions branch November 2, 2026 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Investigate why ubuntu-24.04-arm with pixi-shell pwsh behaves weirdly

2 participants