We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c11d5fe commit 2470081Copy full SHA for 2470081
src/cli.ts
@@ -229,6 +229,12 @@ const main = async(): Promise<boolean | void | void[]> => {
229
return startCli() || new WrapperProcess().start();
230
};
231
232
+// It's possible that the pipe has closed (for example if you run code-server
233
+// --version | head -1). Assume that means we're done.
234
+if (!process.stdout.isTTY) {
235
+ process.stdout.on("error", () => process.exit());
236
+}
237
+
238
main().catch((error) => {
239
logger.error(error.message);
240
process.exit(typeof error.code === "number" ? error.code : 1);
0 commit comments