fix: close validator and path edge cases

This commit is contained in:
haelyra
2026-08-29 15:36:59 -04:00
parent 703163275d
commit 1bdda4bdac
6 changed files with 101 additions and 18 deletions
+8 -3
View File
@@ -151,9 +151,14 @@ else failed++;
if (
test('shell test runner honors a per-invocation BASH_PATH override', () => {
const missingBash = path.join(os.tmpdir(), 'ecc-missing-bash-executable');
const result = runBash(prePushHook, { env: { BASH_PATH: missingBash } });
assert.strictEqual(result.error?.code, 'ENOENT');
const tempDir = createTempDir('ecc-missing-bash-');
try {
const missingBash = path.join(tempDir, 'bash');
const result = runBash(prePushHook, { env: { BASH_PATH: missingBash } });
assert.strictEqual(result.error?.code, 'ENOENT');
} finally {
cleanup(tempDir);
}
})
)
passed++;