diff --git a/server-console/src/main.js b/server-console/src/main.js index 35e51b4179..10918cbb82 100644 --- a/server-console/src/main.js +++ b/server-console/src/main.js @@ -45,10 +45,11 @@ function getBuildInfo() { } else if (osType == 'Darwin') { var contentPath = ".app/Contents/"; var contentEndIndex = __dirname.indexOf(contentPath); + if (contentEndIndex != -1) { // this is an app bundle var appPath = __dirname.substring(0, contentEndIndex) + ".app"; - buildInfoPath = path.resolve(appPath, "/Contents/Resources/build-info.json"); + buildInfoPath = path.join(appPath, "/Contents/Resources/build-info.json"); } }