-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Handle infer cases where electron-prebuilt-compile points to a URL/path instead of a version #975
Comments
I appreciate the time you've taken to write this up, but I don't think this is the right solution. For your specific use case, Electron Packager is not the right level at which to solve this problem. If you weren't using Electron Forge (v5), I would just tell you to programmatically set the Since you're using Electron Forge v5, I would say that there could be some code added to |
Yes, once electron-forge v6 is released/stable this shouldn't be needed any more, and it's fine if you don't want to go this route (I can use the fork in the mean time). Still, I don't understand why it isn't considered a bug that specifying a valid Another solution I should've mentioned would be to drop support for versions of |
I was reading this in the context of a feature request. Looking at it again, yes, it's a bug that Electron Packager isn't ignoring the cases where |
My fault: that is how I filed it. Thanks for fixing. I'll try using the |
Preflight Checklist
Problem Description
As discussed in #909 the requirement to specify
electron-prebuilt-compile
as a semver string inpackage.json
makes it difficult/impossible to use one's own tarball instead (especially important aselectron-prebuilt-compile
appears to be dying). This was partially addressed by #932 but that code still attempts to parse the version string.Proposed Solution
Wrap the call to
new semver.Range(electronVersion)
in atry ... catch
and if it can't be parsed then attempt to resolve it like we normally do instead of blowing up. I have done this in my fork here:master...jacobq:support-alternative-epc-version-strings
Alternatives Considered
When
semver
fails to parse the version string we could try searching it for a simple dot-delimited version number. For most npm tarball URLs this will produce the right version number, but it is merely by coincidence and won't necessarily work with git repository references, etc.Additional Information
The text was updated successfully, but these errors were encountered: