mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-02 00:09:30 +01:00
Merge pull request #303596 from microsoft/isidorn/attractive-goldfish
fixes #303425
This commit is contained in:
@@ -720,10 +720,6 @@ export class RunInTerminalTool extends Disposable implements IToolImpl {
|
||||
}
|
||||
|
||||
if (requiresUnsandboxConfirmation) {
|
||||
disclaimer = new MarkdownString([
|
||||
disclaimer?.value,
|
||||
localize('runInTerminal.unsandboxed.disclaimer', "$(warning) This command will run outside the terminal sandbox and may access files, network resources, or system state that sandboxed commands cannot reach.")
|
||||
].filter(Boolean).join(' '), { supportThemeIcons: true, isTrusted: disclaimer?.isTrusted });
|
||||
confirmationTitle = args.isBackground
|
||||
? localize('runInTerminal.unsandboxed.background', "Run `{0}` command outside the sandbox in background?", shellType)
|
||||
: localize('runInTerminal.unsandboxed', "Run `{0}` command outside the sandbox?", shellType);
|
||||
|
||||
@@ -480,12 +480,7 @@ suite('RunInTerminalTool', () => {
|
||||
}
|
||||
ok(confirmationMessage.value.includes('Reason for leaving the sandbox: Needs network access outside the sandbox'));
|
||||
|
||||
const disclaimer = result?.confirmationMessages?.disclaimer;
|
||||
ok(disclaimer && typeof disclaimer !== 'string');
|
||||
if (!disclaimer || typeof disclaimer === 'string') {
|
||||
throw new Error('Expected markdown disclaimer');
|
||||
}
|
||||
ok(disclaimer.value.includes('outside the terminal sandbox'));
|
||||
strictEqual(result?.confirmationMessages?.disclaimer, undefined);
|
||||
strictEqual(result?.confirmationMessages?.terminalCustomActions, undefined);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user