From dffb61695f2b7a8a0a6603f9821c5540262da494 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Tue, 9 May 2023 09:36:16 -0700 Subject: [PATCH] Set SI command line when nonce is not passed Part of #179913 --- .../terminal/common/capabilities/commandDetectionCapability.ts | 2 +- src/vs/platform/terminal/common/xterm/shellIntegrationAddon.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/platform/terminal/common/capabilities/commandDetectionCapability.ts b/src/vs/platform/terminal/common/capabilities/commandDetectionCapability.ts index da385fa2f757b..bcf8afda23ded 100644 --- a/src/vs/platform/terminal/common/capabilities/commandDetectionCapability.ts +++ b/src/vs/platform/terminal/common/capabilities/commandDetectionCapability.ts @@ -550,7 +550,7 @@ export class CommandDetectionCapability implements ICommandDetectionCapability { } setCommandLine(commandLine: string, isTrusted: boolean) { - this._logService.debug('CommandDetectionCapability#setCommandLine', commandLine); + this._logService.debug('CommandDetectionCapability#setCommandLine', commandLine, isTrusted); this._currentCommand.command = commandLine; this._currentCommand.isTrusted = isTrusted; } diff --git a/src/vs/platform/terminal/common/xterm/shellIntegrationAddon.ts b/src/vs/platform/terminal/common/xterm/shellIntegrationAddon.ts index b18c1e35010e6..c0bf4fcb21ca2 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 === 2) { + if (args.length >= 1 || args.length <= 2) { commandLine = deserializeMessage(args[0]); } else { commandLine = '';