Skip to content

Commit

Permalink
Fix Electron-app root path detection (#34)
Browse files Browse the repository at this point in the history
* Fix Electron-app root path detection

* Cleanup
  • Loading branch information
Jeff Bargmann authored and adam-lynch committed Nov 11, 2017
1 parent d7fb4d5 commit c64219f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,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


fixOpts: =>
Expand Down

0 comments on commit c64219f

Please sign in to comment.