File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -486,9 +486,10 @@ export const shouldOpenInExistingInstance = async (args: Args): Promise<string |
486486 }
487487
488488 // It's possible the user is trying to spawn another instance of code-server.
489- // Check if any unrelated flags are set (add one for `_` which always exists),
490- // that a file or directory was passed, and that the socket is active.
491- if ( Object . keys ( args ) . length === openInFlagCount + 1 && args . _ . length > 0 ) {
489+ // Check if any unrelated flags are set (check against one because `_` always
490+ // exists), that a file or directory was passed, and that the socket is
491+ // active.
492+ if ( Object . keys ( args ) . length === 1 && args . _ . length > 0 ) {
492493 const socketPath = await readSocketPath ( )
493494 if ( socketPath && ( await canConnect ( socketPath ) ) ) {
494495 return socketPath
You can’t perform that action at this time.
0 commit comments