8000 fix: Azure trust signing fails with spaces in parameters by teamchong · Pull Request #8979 · electron-userland/electron-builder · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: Azure trust signing fails with spaces in parameters #8979

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

teamchong
Copy link
Contributor

Why

Azure trust signing fails when parameters contain spaces or special characters, breaking the build process for applications using this signing method.

How

By properly escaping PowerShell parameter values using single quotes and handling existing quotes in values.

What

  • Added string value wrapping with single quotes
  • Escape existing single quotes by doubling them ('')
  • Converted parameters to string to ensure consistent handling

Technical Details

While this approach quotes all parameters, it remains compatible with the various parameter types used by Invoke-TrustedSigning:

  • String parameters (like -Files, -Endpoint, -CertificateProfileName): Properly handled with quotes to preserve spaces
  • Integer parameters (like -FilesFolderDepth): PowerShell automatically converts quoted values like '0' to integers
  • Boolean parameters (like -AppendSignature): PowerShell correctly interprets quoted boolean values ('$true'$true)

PowerShell's automatic type conversion ensures these quoted values are interpreted correctly, while fixing the escaping issues with spaces and special characters in paths.

Copy link
changeset-bot bot commented Mar 20, 2025

⚠️ No Changeset found

Latest commit: f09a96e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@teamchong teamchong changed the title Fix: Azure trust signing fails with spaces in parameters fix: Azure trust signing fails with spaces in parameters Mar 20, 2025
@mmaietta mmaietta merged commit f24a2ce into electron-userland:master Mar 20, 2025
15 checks passed
@github-actions github-actions bot mentioned this pull request Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0