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 Electron-app root path detection #34

Merged
merged 2 commits into from
Nov 11, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/index.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ module.exports = class AutoLaunch
# Does not match when the three are different
# Also matches when the path is pointing not to the exectuable in the inner app at all but to the Electron
# executable in the outer app
return path.replace /(^.+?[^\/]+?\.app)\/Contents\/(Frameworks\/((\1|[^\/]+?) Helper)\.app\/Contents\/MacOS\/\3|MacOS\/Electron)/, '$1'
path = path.replace /(^.+?[^\/]+?\.app)\/Contents\/(Frameworks\/((\1|[^\/]+?) Helper)\.app\/Contents\/MacOS\/\3|MacOS\/Electron)/, '$1'
path = path.replace /\.app\/Contents\/MacOS\/[^\/]*$/, '.app'
return path

removeNwjsLoginItem: ->
@api.disable {appName: 'nwjs Helper'}, ->
Expand Down