Preflight Checklist
Issue Details
$ npx electron-packager --version
Electron Packager 19.0.1
Node v22.19.0
Host Operating system: darwin 21.6.0 (x64)
- Last Known Working Electron Packager version::
18.4.4
To Reproduce
$ npx @electron/packager ... \
--app-version "1.0" ...
Expected Behavior
Packges the app with version "1.0".
Actual Behavior
Errors out with:
Invalid processed options
Additional Information
This is because, in src/packager.ts in isValidProcessedOptions(), you check whether typeof opts.appVersion === 'string'. But 1.0 can be represented as a number. (The docs do not seem to require the --app-version to be a non-number.)
This appears to have been introduced by df586b9.
Finally, even if --app-version should be required to be a non-number, "Invalid processed options" does not convey that well at all.
Preflight Checklist
Issue Details
18.4.4
To Reproduce
Expected Behavior
Packges the app with version "1.0".
Actual Behavior
Errors out with:
Additional Information
This is because, in
src/packager.tsinisValidProcessedOptions(), you check whethertypeof opts.appVersion === 'string'. But1.0can be represented as a number. (The docs do not seem to require the--app-versionto be a non-number.)This appears to have been introduced by df586b9.
Finally, even if
--app-versionshould be required to be a non-number, "Invalid processed options" does not convey that well at all.