fix(git): isolate catalog commands from parent hook environment
This commit is contained in:
1 parent
816e3875c2
commit
98b0009206
4 files changed
+51
-2
No files matched your search
@@ -4,6 +4,7 @@ import { promises as fs } from "node:fs";
|
||||
import { hostname } from "node:os";
|
||||
import path from "node:path";
|
||||
import { promisify } from "node:util";
|
||||
import { gitProcessEnvironment } from "./git-process-environment";
|
||||
|
||||
const exec = promisify(execFile);
|
||||
export const CATALOG_REMOTE =
|
||||
@@ -115,7 +116,11 @@ export async function publishCatalogFiles(options: {
|
||||
cwd: checkout,
|
||||
timeout: 120_000,
|
||||
maxBuffer: 16 * 1024 * 1024,
|
||||
env: { ...process.env, ...options.env, GIT_TERMINAL_PROMPT: "0" },
|
||||
env: {
|
||||
...gitProcessEnvironment(),
|
||||
...options.env,
|
||||
GIT_TERMINAL_PROMPT: "0",
|
||||
},
|
||||
});
|
||||
return stdout.trim();
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user