mirror of
https://github.com/affaan-m/ECC.git
synced 2026-09-17 23:28:04 +02:00
fix: close validator and path edge cases
This commit is contained in:
@@ -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++;
|
||||
|
||||
Reference in New Issue
Block a user