mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-05-01 00:50:00 +08:00
test: relax windows install apply timeout
This commit is contained in:
parent
d9d52d8b77
commit
2c56c9c69f
@ -10,6 +10,7 @@ const { execFileSync } = require('child_process');
|
|||||||
const { applyInstallPlan } = require('../../scripts/lib/install/apply');
|
const { applyInstallPlan } = require('../../scripts/lib/install/apply');
|
||||||
|
|
||||||
const SCRIPT = path.join(__dirname, '..', '..', 'scripts', 'install-apply.js');
|
const SCRIPT = path.join(__dirname, '..', '..', 'scripts', 'install-apply.js');
|
||||||
|
const DEFAULT_INSTALL_APPLY_TIMEOUT_MS = process.platform === 'win32' ? 30000 : 10000;
|
||||||
|
|
||||||
function createTempDir(prefix) {
|
function createTempDir(prefix) {
|
||||||
return fs.mkdtempSync(path.join(os.tmpdir(), prefix));
|
return fs.mkdtempSync(path.join(os.tmpdir(), prefix));
|
||||||
@ -38,7 +39,7 @@ function run(args = [], options = {}) {
|
|||||||
env,
|
env,
|
||||||
encoding: 'utf8',
|
encoding: 'utf8',
|
||||||
stdio: ['pipe', 'pipe', 'pipe'],
|
stdio: ['pipe', 'pipe', 'pipe'],
|
||||||
timeout: 10000,
|
timeout: options.timeout || DEFAULT_INSTALL_APPLY_TIMEOUT_MS,
|
||||||
});
|
});
|
||||||
|
|
||||||
return { code: 0, stdout, stderr: '' };
|
return { code: 0, stdout, stderr: '' };
|
||||||
@ -46,7 +47,7 @@ function run(args = [], options = {}) {
|
|||||||
return {
|
return {
|
||||||
code: error.status || 1,
|
code: error.status || 1,
|
||||||
stdout: error.stdout || '',
|
stdout: error.stdout || '',
|
||||||
stderr: error.stderr || '',
|
stderr: error.stderr || error.message || '',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user