cli-five 0.2.4 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cli-five",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "Code Like I'm Five — scaffold a 5-agent VS Code Copilot team into any repo.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -375,22 +375,20 @@ function runSkills(env, skillsArgs, cwd) {
375
375
  function runSkillsTracked(env, skillsArgs, cwd) {
376
376
  const { cmd, args } = env.runner(skillsArgs);
377
377
  return new Promise((resolve) => {
378
- let output = '';
379
- const proc = spawn(cmd, args, { cwd, stdio: ['inherit', 'pipe', 'pipe'] });
380
- proc.stdout.on('data', (chunk) => {
381
- const text = chunk.toString();
382
- process.stdout.write(text);
383
- output += text;
384
- });
378
+ // stdout/stderr inherit so the child writes directly to the TTY.
379
+ // This prevents line-buffering from swallowing unterminated prompt lines
380
+ // (e.g. the global vs local install question from the skills CLI).
381
+ // Failure is detected via exit code; stderr still captured for reason extraction.
382
+ let stderrOutput = '';
383
+ const proc = spawn(cmd, args, { cwd, stdio: ['inherit', 'inherit', 'pipe'] });
385
384
  proc.stderr.on('data', (chunk) => {
386
385
  const text = chunk.toString();
387
386
  process.stderr.write(text);
388
- output += text;
387
+ stderrOutput += text;
389
388
  });
390
389
  proc.on('exit', (code) => {
391
- const clean = stripAnsi(output);
392
- if (code !== 0 || /failed to clone|installation failed|canceled/i.test(clean)) {
393
- const reason = extractFailureReason(clean);
390
+ if (code !== 0) {
391
+ const reason = extractFailureReason(stripAnsi(stderrOutput)) || `exited with code ${code}`;
394
392
  resolve({ ok: false, reason });
395
393
  } else {
396
394
  resolve({ ok: true, reason: null });