Skip to content

Fix rustup-init fallback: wrap in ErrorActionPreference Continue - #320

Merged
Finesssee merged 1 commit into
mainfrom
fix/circleci-rustup-init-flags
Aug 15, 2026
Merged

Fix rustup-init fallback: wrap in ErrorActionPreference Continue#320
Finesssee merged 1 commit into
mainfrom
fix/circleci-rustup-init-flags

Conversation

@Finesssee

@Finesssee Finesssee commented Aug 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • wrap rustup-init.exe invocation in try/finally with $ErrorActionPreference = 'Continue' — the script default is Stop, and rustup-init writes warnings to stderr (e.g. "It looks like you have an existing installation of Rust at:") which triggered an immediate throw under Stop
  • add --no-modify-path flag to avoid PATH conflicts with existing Chocolatey Rust installation

Root cause

Pipeline #35: choco install rustup.install failed (package not found on community feed), then rustup-init.exe fallback triggered but failed because rustup-init wrote a warning to stderr about the existing Rust installation. With $ErrorActionPreference = Stop at the script level, the stderr warning was treated as a terminating error, throwing before rustup-init could complete.

Validation

  • PowerShell parser passed for all release scripts
  • scripts/release-pipeline.tests.ps1 passed
  • circleci config validate .circleci/config.yml passed
  • no version files changed

View with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is enabled.

@Finesssee
Finesssee merged commit b363210 into main Aug 15, 2026
3 checks passed
@Finesssee
Finesssee deleted the fix/circleci-rustup-init-flags branch August 15, 2026 06:20
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.

1 participant