Skip to content

Commit 66ad45b

Browse files
authored
cli - ignore std error unless verbose (microsoft#183787) (microsoft#184031)
1 parent fbbcd0e commit 66ad45b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/vs/code/node/cli.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,8 +414,9 @@ export async function main(argv: string[]): Promise<any> {
414414
let child: ChildProcess;
415415
if (!isMacOSBigSurOrNewer) {
416416
if (!verbose && args.status) {
417-
options['stdio'] = 'pipe'; // restore ability to see output when --status is used
417+
options['stdio'] = ['ignore', 'pipe', 'ignore']; // restore ability to see output when --status is used
418418
}
419+
419420
// We spawn process.execPath directly
420421
child = spawn(process.execPath, argv.slice(2), options);
421422
} else {
@@ -440,7 +441,7 @@ export async function main(argv: string[]): Promise<any> {
440441
// The open command only allows for redirecting stderr and stdout to files,
441442
// so we make it redirect those to temp files, and then use a logger to
442443
// redirect the file output to the console
443-
for (const outputType of ['stdout', 'stderr']) {
444+
for (const outputType of verbose ? ['stdout', 'stderr'] : ['stdout']) {
444445

445446
// Tmp file to target output to
446447
const tmpName = randomPath(tmpdir(), `code-${outputType}`);

0 commit comments

Comments
 (0)