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
@@ -9,6 +9,7 @@ import {
|
||||
recoverCatalogQueue,
|
||||
sqlValue,
|
||||
} from "./catalog-git-core";
|
||||
import { gitProcessEnvironment } from "./git-process-environment";
|
||||
|
||||
describe("catalog export", () => {
|
||||
it("recovers queue entries owned by a terminated local process", async () => {
|
||||
@@ -55,7 +56,11 @@ describe("catalog export", () => {
|
||||
const remote = path.join(root, "remote.git");
|
||||
const checkout = path.join(root, "checkout");
|
||||
const git = (cwd: string, ...args: string[]) =>
|
||||
execFileSync("git", args, { cwd, encoding: "utf8" }).trim();
|
||||
execFileSync("git", args, {
|
||||
cwd,
|
||||
encoding: "utf8",
|
||||
env: gitProcessEnvironment(),
|
||||
}).trim();
|
||||
git(root, "init", "--bare", remote);
|
||||
git(root, "clone", remote, checkout);
|
||||
git(checkout, "checkout", "-b", "Beta-3");
|
||||
|
||||
Reference in new issue
Block a user