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: app.getAppPath() returning default-app path when no package.json found #18763

Merged
merged 1 commit into from Jun 19, 2019

Conversation

miniak
Copy link
Contributor

@miniak miniak commented Jun 13, 2019

Description of Change

app.getAppPath() currently returns the default-app path when running electron app with no package.json or electron app/index.js. It should return the path to app instead.

The default-app only calls app._setDefaultAppPaths(packagePath) when package.json exists.

Checklist

Release Notes

Notes: Fixed app.getAppPath() returning default-app path when running electron app with no package.json or electron app/index.js. Now the directory containing the executed file is returned.

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Jun 13, 2019
@miniak miniak self-assigned this Jun 13, 2019
@miniak miniak changed the title fix: app.getAppPath() returning default-app path for files or directories without package.json fix: app.getAppPath() returning default-app path when no package.json found Jun 13, 2019
@miniak miniak marked this pull request as ready for review June 13, 2019 08:01
@codebytere
Copy link
Member

This test:

node feature inspector "after each" hook for "does does not crash when quitting with the inspector connected" - "after each" hook for "does does not crash when quitting with the inspector connected"

seems to be deterministically failing on both macOS and Linux atm

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Jun 14, 2019
Copy link
Member

@zcbenz zcbenz left a 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.

@miniak
Copy link
Contributor Author

miniak commented Jun 16, 2019

@zcbenz I had to implement it differently, please review again

@miniak miniak force-pushed the miniak/fix-app-path branch 2 times, most recently from 7a82c75 to f9e0edb Compare June 16, 2019 10:56
@miniak
Copy link
Contributor Author

miniak commented Jun 17, 2019

@codebytere fixed, can you please check again?

@alexeykuzmin alexeykuzmin merged commit 79f0c44 into master Jun 19, 2019
@release-clerk
Copy link

release-clerk bot commented Jun 19, 2019

Release Notes Persisted

Fixed app.getAppPath() returning default-app path when running electron app with no package.json or electron app/index.js. Now the directory containing the executed file is returned.

@trop
Copy link
Contributor

trop bot commented Jun 19, 2019

I was unable to backport this PR to "3-1-x" cleanly;
you will need to perform this backport manually.

@trop
Copy link
Contributor

trop bot commented Jun 19, 2019

I was unable to backport this PR to "4-2-x" cleanly;
you will need to perform this backport manually.

@trop
Copy link
Contributor

trop bot commented Jun 19, 2019

I have automatically backported this PR to "5-0-x", please check out #18889

@alexeykuzmin alexeykuzmin deleted the miniak/fix-app-path branch June 19, 2019 21:37
miniak added a commit that referenced this pull request Jun 20, 2019
miniak added a commit that referenced this pull request Jun 20, 2019
@trop
Copy link
Contributor

trop bot commented Jun 20, 2019

A maintainer has manually backported this PR to "5-0-x", please check out #18894

@trop
Copy link
Contributor

trop bot commented Jun 20, 2019

A maintainer has manually backported this PR to "4-2-x", please check out #18895

@trop
Copy link
Contributor

trop bot commented Jun 20, 2019

A maintainer has manually backported this PR to "3-1-x", please check out #18896

codebytere pushed a commit that referenced this pull request Jun 21, 2019
@sofianguy sofianguy added this to Fixed for 6.0.0-beta.10 in 6.1.x Jun 22, 2019
codebytere pushed a commit that referenced this pull request Jun 24, 2019
@sofianguy sofianguy added this to Fixed in 5.0.6 in 5.0.x Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
5.0.x
Fixed in 5.0.6
6.1.x
Fixed for 6.0.0-beta.10
Development

Successfully merging this pull request may close these issues.

None yet

4 participants