From 466a04f8741ccada3f5e0e2c2a38c60ed57ee4a6 Mon Sep 17 00:00:00 2001 From: Asher Date: Wed, 7 Oct 2020 13:03:39 -0500 Subject: [PATCH] Remove pointless use of openInFlagCount It'll always be zero here. --- src/node/cli.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/node/cli.ts b/src/node/cli.ts index 92bf39cb..1403d892 100644 --- a/src/node/cli.ts +++ b/src/node/cli.ts @@ -529,9 +529,10 @@ export const shouldOpenInExistingInstance = async (args: Args): Promise 0) { + // Check if any unrelated flags are set (check against one because `_` always + // exists), that a file or directory was passed, and that the socket is + // active. + if (Object.keys(args).length === 1 && args._.length > 0) { const socketPath = await readSocketPath() if (socketPath && (await canConnect(socketPath))) { return socketPath