Skip to content

Commit 1b832e1

Browse files
committed
WIP: Test isTransient feature
1 parent 03f640b commit 1b832e1

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

extension-dev.code-workspace

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@
205205
"runtimeExecutable": "${execPath}",
206206
"args": [
207207
"--disable-extensions",
208+
"--enable-proposed-api",
208209
"--extensionDevelopmentPath=${workspaceFolder:Client}"
209210
],
210211
"sourceMaps": true,

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@
7272
"typescript": "~4.5.5",
7373
"vsce": "~2.6.7"
7474
},
75+
"enabledApiProposals": [
76+
"terminalDisablePersistence"
77+
],
7578
"extensionDependencies": [
7679
"vscode.powershell"
7780
],

src/process.ts

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,17 @@ export class PowerShellProcess {
104104
utils.deleteSessionFile(this.sessionFilePath);
105105

106106
// Launch PowerShell in the integrated terminal
107-
this.consoleTerminal =
108-
vscode.window.createTerminal({
109-
name: this.title,
110-
shellPath: this.exePath,
111-
shellArgs: powerShellArgs,
112-
hideFromUser: !this.sessionSettings.integratedConsole.showOnStartup,
113-
cwd: this.sessionSettings.cwd
114-
});
107+
const terminalOptions = {
108+
name: this.title,
109+
shellPath: this.exePath,
110+
shellArgs: powerShellArgs,
111+
hideFromUser: !this.sessionSettings.integratedConsole.showOnStartup,
112+
cwd: this.sessionSettings.cwd,
113+
disablePersistence: true,
114+
// isTransient: true
115+
};
116+
117+
this.consoleTerminal = vscode.window.createTerminal(terminalOptions);
115118

116119
const pwshName = path.basename(this.exePath);
117120
this.log.write(`${pwshName} started.`);

0 commit comments

Comments
 (0)