Skip to content

Commit 6ce489a

Browse files
committed
Remove pointless use of openInFlagCount
It'll always be zero here.
1 parent 82b7909 commit 6ce489a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/node/cli.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ export const shouldOpenInExistingInstance = async (args: Args): Promise<string |
488488
// It's possible the user is trying to spawn another instance of code-server.
489489
// Check if any unrelated flags are set (add one for `_` which always exists),
490490
// that a file or directory was passed, and that the socket is active.
491-
if (Object.keys(args).length === openInFlagCount + 1 && args._.length > 0) {
491+
if (Object.keys(args).length === 1 && args._.length > 0) {
492492
const socketPath = await readSocketPath()
493493
if (socketPath && (await canConnect(socketPath))) {
494494
return socketPath

0 commit comments

Comments
 (0)