earendil-works/pi · error

Failed to run ${command} ${args.join(" ")}: ${result.error?.

Error message

Failed to run ${command} ${args.join(" ")}: ${result.error?.message || result.stderr || result.stdout}

What it means

Error "Failed to run ${command} ${args.join(" ")}: ${result.error?.message || result.stderr || result.stdout}" thrown in earendil-works/pi.

Source

Thrown at packages/coding-agent/src/core/package-manager.ts:2693

			child.on("exit", (code) => {
				if (code === 0) {
					resolvePromise();
				} else {
					reject(new Error(`${command} ${args.join(" ")} failed with code ${code}`));
				}
			});
		});
	}

	private runCommandSync(command: string, args: string[]): string {
		const env = getEnv();
		const result = spawnProcessSync(command, args, {
			stdio: ["ignore", "pipe", "pipe"],
			encoding: "utf-8",
			env,
		});
		if (result.error || result.status !== 0) {
			throw new Error(
				`Failed to run ${command} ${args.join(" ")}: ${result.error?.message || result.stderr || result.stdout}`,
			);
		}
		return (result.stdout || result.stderr || "").trim();
	}
}

View on GitHub (pinned to 4af9d21d3b)

When it happens

Trigger: Thrown at packages/coding-agent/src/core/package-manager.ts:2693 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of earendil-works/pi@4af9d21d3b (2026-08-24). Data as JSON: /api/errors/5cd9fdbd2e812d38. Report an issue: GitHub.