Skip to content

Commit ea84c71

Browse files
committed
Print command when spawning a triplet command in --verbose
1 parent ea26287 commit ea84c71

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

packages/cmake-rn/src/cli.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,16 @@ program = program.action(
228228
triplet,
229229
platform,
230230
async spawn(command: string, args: string[], cwd?: string) {
231+
const outputPrefix = verbose ? chalk.dim(`[${triplet}] `) : undefined;
232+
if (verbose) {
233+
console.log(
234+
`${outputPrefix}» ${command} ${args.map((arg) => chalk.dim(`${arg}`)).join(" ")}`,
235+
cwd ? `(in ${chalk.dim(cwd)})` : "",
236+
);
237+
}
231238
await spawn(command, args, {
232239
outputMode: verbose ? "inherit" : "buffered",
233-
outputPrefix: verbose ? chalk.dim(`[${triplet}] `) : undefined,
240+
outputPrefix,
234241
cwd,
235242
});
236243
},

0 commit comments

Comments
 (0)