Skip to content

fix: resolve absolute paths in Windows signCommand for Tauri bundler#44

Merged
ibetitsmike merged 1 commit intomainfrom
mike/fix-windows-signing-paths
Mar 5, 2026
Merged

fix: resolve absolute paths in Windows signCommand for Tauri bundler#44
ibetitsmike merged 1 commit intomainfrom
mike/fix-windows-signing-paths

Conversation

@ibetitsmike
Copy link
Collaborator

Problem

The Windows release build fails with failed to run pwsh during code signing. This has blocked all Windows artifacts since v0.1.4.

Root cause: Tauri v2's bundler spawns signCommand via std::process::Command (Rust), which calls CreateProcessW on Windows without a shell. Bare command names like pwsh or powershell fail PATH resolution in the bundler's process context, even though they're available in the runner's shell.

Fix

Resolve absolute paths to both pwsh.exe and the signing script at workflow time using PowerShell's Get-Command and Resolve-Path, so the Tauri bundler gets fully-qualified paths it can pass directly to CreateProcessW.

Changes

  • .github/workflows/release.yml: Switch the signCommand config step from shell: bash (heredoc) to shell: pwsh with proper path resolution and ConvertTo-Json serialization. Added diagnostic output for debugging.

Example generated config

{
  "bundle": {
    "windows": {
      "signCommand": {
        "cmd": "C:/Program Files/PowerShell/7/pwsh.exe",
        "args": ["-File", "D:/a/pr-buddy/pr-buddy/scripts/sign-windows.ps1", "%1"]
      }
    }
  }
}

@ibetitsmike ibetitsmike merged commit 9368ee0 into main Mar 5, 2026
6 of 7 checks passed
@ibetitsmike ibetitsmike mentioned this pull request Mar 5, 2026
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