Skip to content
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

fix: When error code is ENOENT, try to use electron.shell.openPath to… #7767

Merged
merged 4 commits into from Sep 13, 2023

Conversation

jackple
Copy link
Contributor

@jackple jackple commented Sep 8, 2023

I found that some Windows machines will report the errorCode ENOENT even options.installerPath is exist, but electron-updater never handle it! I think openPath can solve the problem.

log:

[2023-09-07 11:54:11.500] [main] [info]  Executing: C:\Users\Administrator\AppData\Local\xx-updater\pending\xx-ia32-1.9.1-3.exe with args: --updated,/S,--force-run
[2023-09-07 11:54:11.502] [main] [info]  Cannot run installer: error code: ENOENT, error message: "spawn C:\Users\Administrator\AppData\Local\xx-updater\pending\xx-ia32-1.9.1-3.exe ENOENT", will be executed again using elevate if EACCES"
[2023-09-07 11:54:11.503] [main] [error] Error: Error: spawn C:\Users\Administrator\AppData\Local\xx-updater\pending\xx-ia32-1.9.1-3.exe ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
    at onErrorNT (node:internal/child_process:477:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)

@changeset-bot
Copy link

changeset-bot bot commented Sep 8, 2023

🦋 Changeset detected

Latest commit: d481d7d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
electron-updater Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify
Copy link

netlify bot commented Sep 8, 2023

Deploy Preview for car-park-attendant-cleat-11576 ready!

Name Link
🔨 Latest commit d481d7d
🔍 Latest deploy log https://app.netlify.com/sites/car-park-attendant-cleat-11576/deploys/6501fc55e1cf1d00082e87b4
😎 Deploy Preview https://deploy-preview-7767--car-park-attendant-cleat-11576.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@mmaietta
Copy link
Collaborator

mmaietta commented Sep 12, 2023

Thanks for contributing! Quick Q, has this been tested thoroughly, such as applying the change via patch-package?

Also, please fix the compiler error:

packages/electron-updater/src/NsisUpdater.ts(163,73): error TS7006: Parameter 'err' implicitly has an 'any' type.

@jackple
Copy link
Contributor Author

jackple commented Sep 13, 2023

@mmaietta I have tested on several Windows machine, includes Win7/10, also my mac. And I do not think this change will affect linux or mac.

@mmaietta mmaietta merged commit 21f3069 into electron-userland:master Sep 13, 2023
13 checks passed
@github-actions github-actions bot mentioned this pull request Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants