diff --git a/src/vs/platform/terminal/common/xterm/shellIntegrationAddon.ts b/src/vs/platform/terminal/common/xterm/shellIntegrationAddon.ts index c0bf4fcb21ca2..0d08eee1dbdf3 100644 --- a/src/vs/platform/terminal/common/xterm/shellIntegrationAddon.ts +++ b/src/vs/platform/terminal/common/xterm/shellIntegrationAddon.ts @@ -334,7 +334,7 @@ export class ShellIntegrationAddon extends Disposable implements IShellIntegrati } case VSCodeOscPt.CommandLine: { let commandLine: string; - if (args.length >= 1 || args.length <= 2) { + if (args.length && args.length <= 2) { commandLine = deserializeMessage(args[0]); } else { commandLine = '';