Skip to content

fix: honor explicit empty --prebuild-tag-prefix - #1284

Merged
VerteDinde merged 1 commit into
mainfrom
fix/empty-prebuild-tag-prefix
Jun 28, 2026
Merged

VerteDinde merged 1 commit into
mainfrom
fix/empty-prebuild-tag-prefix

Conversation

@claude

@claude claude Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Requested by Samuel Attard · Slack thread

Before / After

Before: passing --prebuild-tag-prefix '' (an explicit empty string) was silently turned back into the default v. Because the defaulting used ||, an empty string — being falsy — was discarded, so the prebuilt-binary lookup always used v-prefixed tags even when the user explicitly asked for no prefix.

After: an explicit empty prefix is honored. Only an unset (undefined) prefix falls back to v, so --prebuild-tag-prefix '' now correctly produces an empty tag prefix.

How

Switched the two defaulting sites from logical OR (||) to nullish coalescing (??), so the fallback to 'v' only applies when the value is null/undefined rather than for any falsy value:

  • src/cli.ts — prebuildTagPrefix: argv['prebuild-tag-prefix'] ?? 'v'
  • src/rebuild.ts — this.prebuildTagPrefix = options.prebuildTagPrefix ?? 'v'

Fixes #654


Generated by Claude Code

Use nullish coalescing instead of logical OR when defaulting the
prebuild tag prefix, so an explicit empty string ('') is preserved
rather than being coerced back to the default 'v'.

Fixes #654
@MarshallOfSound
MarshallOfSound marked this pull request as ready for review June 27, 2026 21:38
@MarshallOfSound
MarshallOfSound requested a review from a team as a code owner June 27, 2026 21:38
@VerteDinde
VerteDinde merged commit 8bc2a49 into main Jun 28, 2026
9 checks passed
@VerteDinde
VerteDinde deleted the fix/empty-prebuild-tag-prefix branch June 28, 2026 04:02
@electron-npm-package-publisher

Copy link
Copy Markdown

🎉 This PR is included in version 4.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.

--prebuild-tag-prefix option cannot be empty

3 participants