mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04: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() {
|
exports.getGitCommit = function() {
|
||||||
var version = "";
|
var version = "";
|
||||||
try {
|
try {
|
||||||
var rootPath = path.resolve(npm.dir, '..');
|
var rootPath = exports.root;
|
||||||
if (fs.lstatSync(rootPath + '/.git').isFile()) {
|
if (fs.lstatSync(rootPath + '/.git').isFile()) {
|
||||||
rootPath = fs.readFileSync(rootPath + '/.git', "utf8");
|
rootPath = fs.readFileSync(rootPath + '/.git', "utf8");
|
||||||
rootPath = rootPath.split(' ').pop().trim();
|
rootPath = rootPath.split(' ').pop().trim();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue