fix: don't duplicate /tr, /td, /fd when supplied via signWithParams#115
Merged
Conversation
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
approved these changes
Jun 30, 2026
georgexu99
approved these changes
Jul 1, 2026
|
🎉 This PR is included in version 2.0.6 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Samuel Attard · Slack thread
Before / After
Before — If you passed
/tr,/td, or/fdthroughsignWithParams, 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
getSigntoolArgsnow parsessignWithParamsup front and skips appending a default/tr//td//fdwhen 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