提交 497a3b7d authored 作者: Will Chen's avatar Will Chen

Clean up console messages

上级 0b005e05
...@@ -18,9 +18,7 @@ function checkCommandExists(command: string): Promise<string | null> { ...@@ -18,9 +18,7 @@ function checkCommandExists(command: string): Promise<string | null> {
process.stderr?.on("data", (data) => { process.stderr?.on("data", (data) => {
// Log stderr but don't treat it as a failure unless the exit code is non-zero // Log stderr but don't treat it as a failure unless the exit code is non-zero
console.warn( console.warn(`Stderr from "${command}": ${data.toString().trim()}`);
`Stderr from "${command} --version": ${data.toString().trim()}`
);
}); });
process.on("error", (error) => { process.on("error", (error) => {
...@@ -32,9 +30,7 @@ function checkCommandExists(command: string): Promise<string | null> { ...@@ -32,9 +30,7 @@ function checkCommandExists(command: string): Promise<string | null> {
if (code === 0) { if (code === 0) {
resolve(output.trim()); // Command succeeded, return trimmed output resolve(output.trim()); // Command succeeded, return trimmed output
} else { } else {
console.error( console.error(`Command "${command}" failed with code ${code}`);
`Command "${command} --version" failed with code ${code}`
);
resolve(null); // Command failed resolve(null); // Command failed
} }
}); });
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论