Skip to content

Commit 785a044

Browse files
author
Benjamin Pasero
committed
stdin - ignore if a file path is passed in to open
1 parent af23248 commit 785a044

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/vs/code/node/cli.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,11 @@ export async function main(argv: string[]): TPromise<any> {
6767
}
6868

6969
// If we are running with input from stdin, pipe that into a file and
70-
// open this file via arguments.
70+
// open this file via arguments. Ignore this when we are passed with
71+
// paths to open.
7172
let isReadingFromStdin: boolean;
7273
try {
73-
isReadingFromStdin = !process.stdin.isTTY; // Via https://twitter.com/MylesBorins/status/782009479382626304
74+
isReadingFromStdin = args._.length === 0 && !process.stdin.isTTY; // Via https://twitter.com/MylesBorins/status/782009479382626304
7475
} catch (error) {
7576
// Windows workaround for https://github.com/nodejs/node/issues/11656
7677
}

0 commit comments

Comments
 (0)