diff --git a/src/index.coffee b/src/index.coffee index 3170fbe..c4f31f2 100644 --- a/src/index.coffee +++ b/src/index.coffee @@ -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: =>