fix: try __dirname

This commit is contained in:
Jesse Mazzella 2023-01-27 10:54:23 -08:00
parent b4740f2f7f
commit c6b300a6be

View File

@ -22,18 +22,19 @@ let gitBranch = "error-retrieving-branch";
try {
gitRevision = require("child_process")
.execSync("git rev-parse HEAD", {
cwd: projectRootDir
cwd: __dirname
})
.toString()
.trim();
gitBranch = require("child_process")
.execSync("git rev-parse --abbrev-ref HEAD", {
cwd: projectRootDir
cwd: __dirname
})
.toString()
.trim();
} catch (err) {
console.warn(err);
console.error(err);
// console.warn(err);
}