Clean up console messages
This commit is contained in:
@@ -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> {
|
|||||||
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
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user