From 48b0290977d2027d8ff75146554b76ec4538d041 Mon Sep 17 00:00:00 2001 From: muxator Date: Fri, 19 Oct 2018 18:57:56 +0200 Subject: [PATCH] AbsolutePaths: be able to read the git commit version independently on CWD --HG-- branch : absolute-paths --- src/node/utils/Settings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node/utils/Settings.js b/src/node/utils/Settings.js index 245bf833a..8e478f0da 100644 --- a/src/node/utils/Settings.js +++ b/src/node/utils/Settings.js @@ -367,7 +367,7 @@ exports.exportAvailable = function() { exports.getGitCommit = function() { var version = ""; try { - var rootPath = path.resolve(npm.dir, '..'); + var rootPath = exports.root; if (fs.lstatSync(rootPath + '/.git').isFile()) { rootPath = fs.readFileSync(rootPath + '/.git', "utf8"); rootPath = rootPath.split(' ').pop().trim();