chore: code quality feedback for 2.9.16 (#1754)

* code quality feedback

* agent feedback
This commit is contained in:
Justin Hernandez
2026-02-15 21:54:29 -08:00
committed by GitHub
parent 522ced4f20
commit 709f7b36b2
5 changed files with 28 additions and 20 deletions

View File

@@ -12,7 +12,7 @@ import { strict as assert } from 'assert';
import { existsSync, rmSync, mkdirSync, writeFileSync, readFileSync } from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
import { execSync } from 'child_process';
import { execFileSync } from 'child_process';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
@@ -100,11 +100,15 @@ class TestRunner {
// Helper to run the script and capture output
function runScript(args, cwd = null) {
try {
const result = execSync(`node ${SCRIPT_PATH} ${args}`, {
cwd: cwd || process.cwd(),
encoding: 'utf8',
stdio: 'pipe',
});
const result = execFileSync(
'node',
[SCRIPT_PATH, ...args.split(/\s+/).filter(Boolean)],
{
cwd: cwd || process.cwd(),
encoding: 'utf8',
stdio: 'pipe',
},
);
return { stdout: result, stderr: '', exitCode: 0 };
} catch (error) {
return {