repo-tools: Log all command outputs for debugging

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
This commit is contained in:
Patrik Oldsberg
2026-02-27 10:33:15 +01:00
parent 3a1054f51d
commit f2a8299d7a
+8 -11
View File
@@ -53,17 +53,14 @@ export function createBinRunner(cwd: string, path: string) {
const fileSize = statSync(outPath).size;
const stdout = readFileSync(outPath, 'utf8');
// Temporary debug: log stdout when no help markers found
if (!stdout.includes('Usage:') && !stdout.includes('USAGE:')) {
console.error(
`[createBinRunner debug] no help markers for: node ${args.join(
' ',
)} ` +
`(exit=${result.status}, size=${fileSize}, content=${JSON.stringify(
stdout.slice(0, 300),
)})`,
);
}
// Temporary debug: log first 200 chars of every command
console.error(
`[debug] ${args
.slice(-2)
.join(' ')} size=${fileSize} out=${JSON.stringify(
stdout.slice(0, 200),
)}`,
);
if (result.error) {
throw new Error(`Process error: ${result.error.message}`);