Skip to content

fix: don't duplicate /tr, /td, /fd when supplied via signWithParams#115

Merged
MarshallOfSound merged 1 commit into
mainfrom
fix/issue-46-dedupe-signtool-args
Jul 1, 2026
Merged

fix: don't duplicate /tr, /td, /fd when supplied via signWithParams#115
MarshallOfSound merged 1 commit into
mainfrom
fix/issue-46-dedupe-signtool-args

Conversation

@claude

@claude claude Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Requested by Samuel Attard · Slack thread

Before / After

Before — If you passed /tr, /td, or /fd through signWithParams, windows-sign appended its own copies of those flags too, so signtool received each flag twice and failed.

After — Your supplied flags win and the defaults are skipped, so each flag appears once.

How

getSigntoolArgs now parses signWithParams up front and skips appending a default /tr//td//fd when that flag is already present in the user-supplied params.

Testing

A failing unit test was added first, then made to pass. Lint and build are clean.

Closes #46.


Generated by Claude Code

When a user passes /tr, /td, or /fd through signWithParams, getSigntoolArgs
also appended its own defaults for those flags, causing signtool.exe to error
on the duplicate. Parse signWithParams up front and skip the matching default
when the user already supplied the flag, so the user's value wins.

Fixes #46
@MarshallOfSound MarshallOfSound marked this pull request as ready for review June 30, 2026 16:56
@MarshallOfSound MarshallOfSound requested a review from a team as a code owner June 30, 2026 16:56
@MarshallOfSound MarshallOfSound merged commit dac0715 into main Jul 1, 2026
8 checks passed
@MarshallOfSound MarshallOfSound deleted the fix/issue-46-dedupe-signtool-args branch July 1, 2026 05:15
@electron-npm-package-publisher

Copy link
Copy Markdown

🎉 This PR is included in version 2.0.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adding hash via signWithParams result in error due to duplicating args

3 participants