mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-09-30 01:51:20 +00:00
Merge branch 'main' into fix/web-stop-nexus-ai-1615
This commit is contained in:
commit
66edcd3b37
2 changed files with 7 additions and 3 deletions
|
|
@ -21,6 +21,9 @@ const cleanupBackoffMs = (attempt: number): number => 100 * (attempt + 1);
|
|||
|
||||
const shouldSwallowCleanupError = (err: unknown): boolean => {
|
||||
const code = (err as NodeJS.ErrnoException | undefined)?.code;
|
||||
// ENOTEMPTY can race on any platform (macOS node-gyp cache, Linux
|
||||
// parallel test teardown) — swallow after retries are exhausted.
|
||||
if (code === 'ENOTEMPTY') return true;
|
||||
return process.platform === 'win32' && WINDOWS_NATIVE_LOCK_CODES.has(code ?? '');
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ import { spawnSync } from 'child_process';
|
|||
import fs from 'fs';
|
||||
import fsp from 'fs/promises';
|
||||
import path from 'path';
|
||||
import { cleanupTempDir, cleanupTempDirSync } from '../helpers/test-db.js';
|
||||
import os from 'os';
|
||||
import { runHook, parseHookOutput } from '../utils/hook-test-helpers.js';
|
||||
import { setupCommand } from '../../src/cli/setup.js';
|
||||
|
|
@ -84,8 +85,8 @@ beforeAll(async () => {
|
|||
afterAll(async () => {
|
||||
process.env.HOME = originalHome;
|
||||
process.env.USERPROFILE = originalUserProfile;
|
||||
if (tempHome) await fsp.rm(tempHome, { recursive: true, force: true });
|
||||
if (tmpDir) fs.rmSync(tmpDir, { recursive: true, force: true });
|
||||
if (tempHome) await cleanupTempDir(tempHome);
|
||||
if (tmpDir) cleanupTempDirSync(tmpDir);
|
||||
});
|
||||
|
||||
describe('antigravity hook adapter e2e', () => {
|
||||
|
|
@ -402,7 +403,7 @@ describe('antigravity hook adapter e2e', () => {
|
|||
});
|
||||
|
||||
afterAll(() => {
|
||||
fs.rmSync(cleanupRoot, { recursive: true, force: true });
|
||||
cleanupTempDirSync(cleanupRoot);
|
||||
});
|
||||
|
||||
it('ignores AfterTool when no .gitnexus exists in cwd or any ancestor', () => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue