Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion plugins/guard-pack/tests/guard-pack.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ function runHook(payload, envOverrides = {}) {
delete env[key];
}
}
const child = spawn('node', [SCRIPT_PATH], { env });
// cwd is the isolated TMP_HOME (not a git repo) so branchOnly guards like
// git-safety's push-on-protected read '' for the branch instead of leaking
// in whatever branch CI happens to be on (push-to-main runs were HEAD=main).
const child = spawn('node', [SCRIPT_PATH], { env, cwd: TMP_HOME });
let stdout = '';
let stderr = '';
child.stdout.on('data', (d) => { stdout += d; });
Expand Down
Loading