mirror of
https://github.com/affaan-m/ECC.git
synced 2026-09-08 07:37:48 +02:00
Merge remote-tracking branch 'origin/main' into fix/rules-language-neutral-2026-09-02
This commit is contained in:
@@ -42,6 +42,9 @@ const repoRoot = path.join(__dirname, '..', '..');
|
||||
const bootstrap = path.join(repoRoot, 'scripts', 'hooks', 'plugin-hook-bootstrap.js');
|
||||
const { isRawPassthrough } = require(bootstrap);
|
||||
const FIXTURE_DIR = fs.mkdtempSync(path.join(os.tmpdir(), 'ecc-pr2380-fixtures-'));
|
||||
const SUBPROCESS_TIMEOUT_MS = process.platform === 'darwin' && process.env.CI === 'true'
|
||||
? 120_000
|
||||
: 30_000;
|
||||
|
||||
function cleanupFixtureDir() {
|
||||
fs.rmSync(FIXTURE_DIR, { recursive: true, force: true });
|
||||
@@ -67,7 +70,7 @@ function runBootstrap(args, input, env) {
|
||||
encoding: 'utf8',
|
||||
cwd: repoRoot,
|
||||
env: { ...process.env, ...(env || {}) },
|
||||
timeout: 30000,
|
||||
timeout: SUBPROCESS_TIMEOUT_MS,
|
||||
maxBuffer: 16 * 1024 * 1024,
|
||||
stdio: ['pipe', 'pipe', 'pipe']
|
||||
});
|
||||
@@ -80,7 +83,7 @@ function runHookEntry(args, input, env) {
|
||||
encoding: 'utf8',
|
||||
cwd: repoRoot,
|
||||
env: { ...process.env, ...(env || {}) },
|
||||
timeout: 30000,
|
||||
timeout: SUBPROCESS_TIMEOUT_MS,
|
||||
maxBuffer: 16 * 1024 * 1024,
|
||||
stdio: ['pipe', 'pipe', 'pipe']
|
||||
});
|
||||
|
||||
@@ -29,6 +29,9 @@ const hooksConfig = JSON.parse(
|
||||
);
|
||||
|
||||
const MAX_STDIN = 1024 * 1024;
|
||||
const SUBPROCESS_TIMEOUT_MS = process.platform === 'darwin' && process.env.CI === 'true'
|
||||
? 120_000
|
||||
: 60_000;
|
||||
|
||||
const workDir = fs.mkdtempSync(path.join(os.tmpdir(), 'ecc-stop-stdout-')); // non-git cwd
|
||||
const dataHome = fs.mkdtempSync(path.join(os.tmpdir(), 'ecc-stop-data-'));
|
||||
@@ -75,7 +78,7 @@ function runViaRunner(hookId, script, input) {
|
||||
encoding: 'utf8',
|
||||
cwd: workDir,
|
||||
env: hookEnv(),
|
||||
timeout: 60000,
|
||||
timeout: SUBPROCESS_TIMEOUT_MS,
|
||||
maxBuffer: 16 * 1024 * 1024,
|
||||
stdio: ['pipe', 'pipe', 'pipe']
|
||||
});
|
||||
@@ -87,7 +90,7 @@ function runDirect(script, input) {
|
||||
encoding: 'utf8',
|
||||
cwd: workDir,
|
||||
env: hookEnv(),
|
||||
timeout: 60000,
|
||||
timeout: SUBPROCESS_TIMEOUT_MS,
|
||||
maxBuffer: 16 * 1024 * 1024,
|
||||
stdio: ['pipe', 'pipe', 'pipe']
|
||||
});
|
||||
@@ -107,7 +110,7 @@ function runRegisteredStopHook(entry, input, envOverrides = {}) {
|
||||
cwd: workDir,
|
||||
env,
|
||||
shell: true,
|
||||
timeout: 60000,
|
||||
timeout: SUBPROCESS_TIMEOUT_MS,
|
||||
maxBuffer: 16 * 1024 * 1024,
|
||||
stdio: ['pipe', 'pipe', 'pipe']
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user