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 { try {
gitRevision = require("child_process") gitRevision = require("child_process")
.execSync("git rev-parse HEAD", { .execSync("git rev-parse HEAD", {
cwd: projectRootDir cwd: __dirname
}) })
.toString() .toString()
.trim(); .trim();
gitBranch = require("child_process") gitBranch = require("child_process")
.execSync("git rev-parse --abbrev-ref HEAD", { .execSync("git rev-parse --abbrev-ref HEAD", {
cwd: projectRootDir cwd: __dirname
}) })
.toString() .toString()
.trim(); .trim();
} catch (err) { } catch (err) {
console.warn(err); console.error(err);
// console.warn(err);
} }