mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
AbsolutePaths: be able to read the git commit version independently on CWD
--HG-- branch : absolute-paths
This commit is contained in:
parent
72ccb28382
commit
48b0290977
1 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue