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: app.getAppPath() returning default-app path when no package.json found #18763
Conversation
This test:
seems to be deterministically failing on both macOS and Linux atm |
2ab1416
to
612dc5c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Marking request changes as there is a failing test that needs to be fixed.
The change itself looks good to me. I ❤️ this change as it would fix some weirdness when running test apps.
612dc5c
to
7854810
Compare
@zcbenz I had to implement it differently, please review again |
7a82c75
to
f9e0edb
Compare
…ries without package.json
f9e0edb
to
3b64b1f
Compare
@codebytere fixed, can you please check again? |
Release Notes Persisted
|
I was unable to backport this PR to "3-1-x" cleanly; |
I was unable to backport this PR to "4-2-x" cleanly; |
I have automatically backported this PR to "5-0-x", please check out #18889 |
…ries without package.json (#18763)
…ries without package.json (#18763)
A maintainer has manually backported this PR to "5-0-x", please check out #18894 |
A maintainer has manually backported this PR to "4-2-x", please check out #18895 |
…ries without package.json (#18763)
A maintainer has manually backported this PR to "3-1-x", please check out #18896 |
Description of Change
app.getAppPath()
currently returns the default-app path when runningelectron app
with no package.json orelectron app/index.js
. It should return the path toapp
instead.The default-app only calls
app._setDefaultAppPaths(packagePath)
whenpackage.json
exists.Checklist
npm test
passesRelease Notes
Notes: Fixed
app.getAppPath()
returning default-app path when runningelectron app
with no package.json orelectron app/index.js
. Now the directory containing the executed file is returned.