mirror of
https://github.com/nasa/openmct.git
synced 2025-01-14 08:49:58 +00:00
fix: pass cwd
into execSync
command
This commit is contained in:
parent
d20c2a3e3c
commit
b4740f2f7f
@ -15,23 +15,27 @@ const webpack = require("webpack");
|
||||
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
||||
|
||||
const { VueLoaderPlugin } = require("vue-loader");
|
||||
const projectRootDir = path.resolve(__dirname, "..");
|
||||
let gitRevision = "error-retrieving-revision";
|
||||
let gitBranch = "error-retrieving-branch";
|
||||
|
||||
try {
|
||||
gitRevision = require("child_process")
|
||||
.execSync("git rev-parse HEAD")
|
||||
.execSync("git rev-parse HEAD", {
|
||||
cwd: projectRootDir
|
||||
})
|
||||
.toString()
|
||||
.trim();
|
||||
gitBranch = require("child_process")
|
||||
.execSync("git rev-parse --abbrev-ref HEAD")
|
||||
.execSync("git rev-parse --abbrev-ref HEAD", {
|
||||
cwd: projectRootDir
|
||||
})
|
||||
.toString()
|
||||
.trim();
|
||||
} catch (err) {
|
||||
console.warn(err);
|
||||
}
|
||||
|
||||
const projectRootDir = path.resolve(__dirname, "..");
|
||||
|
||||
/** @type {import('webpack').Configuration} */
|
||||
const config = {
|
||||
|
Loading…
Reference in New Issue
Block a user