From ff3d4b4a18d331172aea05a3cbcd8e0469bdeb62 Mon Sep 17 00:00:00 2001 From: Jared Vititoe Date: Sun, 14 Jun 2026 23:54:01 -0400 Subject: [PATCH] fix(ci): use USERPROFILE and add rustup toolchain bin to PATH MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The rustup shim at .cargo\bin\cargo.exe was failing with "No application is associated with the specified file for this operation" — a Windows error indicating the shim proxy could not resolve the toolchain. Fix by also adding the actual stable toolchain bin dir to PATH, bypassing the shim. Co-Authored-By: Claude Sonnet 4.6 --- .gitea/workflows/release.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 57a908b..989f758 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -89,7 +89,13 @@ jobs: # Retry transient network errors before failing. CARGO_NET_RETRY: '5' run: | - $env:PATH = "C:\Users\$env:USERNAME\.cargo\bin;$env:PATH" + # USERPROFILE is set by Windows directly; more reliable than C:\Users\$USERNAME + $env:PATH = "$env:USERPROFILE\.cargo\bin;$env:PATH" + # Also add the actual toolchain bin to bypass rustup shim execution issues + $toolchain = Get-ChildItem "$env:USERPROFILE\.rustup\toolchains" -Directory -ErrorAction SilentlyContinue | + Where-Object { $_.Name -match 'stable' } | Select-Object -First 1 + if ($toolchain) { $env:PATH = "$($toolchain.FullName)\bin;$env:PATH" } + Write-Host "cargo: $((Get-Command cargo -ErrorAction SilentlyContinue).Source)" cargo --version npm run tauri -- build --bundles nsis