Skip to content

Commit 5a3dbf7

Browse files
committed
log error?
1 parent 96727fa commit 5a3dbf7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/builder-util/src/util.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ export function exec(file: string, args?: Array<string> | null, options?: ExecFi
123123
} else {
124124
// https://github.com/npm/npm/issues/17624
125125
if ((file === "npm" || file === "npm.cmd") && args?.includes("list") && args?.includes("--silent")) {
126+
console.error(chalk.red(`The command "${file} ${args.join(" ")}" failed with exit code ${(error as any).code}.`))
127+
console.error(error.message)
126128
resolve(stdout.toString())
127129
}
128130
let message = chalk.red(removePassword(`Exit code: ${(error as any).code}. ${error.message}`))

0 commit comments

Comments
 (0)