test: stabilize repair lifecycle on Windows

This commit is contained in:
Affaan Mustafa
2026-05-18 03:48:51 -04:00
parent f92f15199c
commit bf17737969
2 changed files with 4 additions and 3 deletions

View File

@@ -3,7 +3,7 @@ const globals = require('globals');
module.exports = [ module.exports = [
{ {
ignores: ['.opencode/dist/**', '.cursor/**', 'node_modules/**'] ignores: ['.opencode/dist/**', '.cursor/**', 'node_modules/**', '.venv/**', 'venv/**', 'coverage/**']
}, },
js.configs.recommended, js.configs.recommended,
{ {

View File

@@ -12,6 +12,7 @@ const INSTALL_SCRIPT = path.join(__dirname, '..', '..', 'scripts', 'install-appl
const DOCTOR_SCRIPT = path.join(__dirname, '..', '..', 'scripts', 'doctor.js'); const DOCTOR_SCRIPT = path.join(__dirname, '..', '..', 'scripts', 'doctor.js');
const REPAIR_SCRIPT = path.join(__dirname, '..', '..', 'scripts', 'repair.js'); const REPAIR_SCRIPT = path.join(__dirname, '..', '..', 'scripts', 'repair.js');
const REPO_ROOT = path.join(__dirname, '..', '..'); const REPO_ROOT = path.join(__dirname, '..', '..');
const CLI_TIMEOUT_MS = 30000;
const CURRENT_PACKAGE_VERSION = JSON.parse( const CURRENT_PACKAGE_VERSION = JSON.parse(
fs.readFileSync(path.join(REPO_ROOT, 'package.json'), 'utf8') fs.readFileSync(path.join(REPO_ROOT, 'package.json'), 'utf8')
).version; ).version;
@@ -51,7 +52,7 @@ function runNode(scriptPath, args = [], options = {}) {
env, env,
encoding: 'utf8', encoding: 'utf8',
stdio: ['pipe', 'pipe', 'pipe'], stdio: ['pipe', 'pipe', 'pipe'],
timeout: 10000, timeout: options.timeout || CLI_TIMEOUT_MS,
}); });
return { code: 0, stdout, stderr: '' }; return { code: 0, stdout, stderr: '' };
@@ -59,7 +60,7 @@ function runNode(scriptPath, 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 || '',
}; };
} }
} }