Skip to content

Commit de99824

Browse files
committed
clean up
1 parent eaaf338 commit de99824

File tree

1 file changed

+4
-18
lines changed

1 file changed

+4
-18
lines changed

src/client/common/terminal/service.ts

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -144,28 +144,14 @@ export class TerminalService implements ITerminalService, Disposable {
144144
}
145145
// TODO: Debt switch to Promise<Terminal> ---> breaks 20 tests
146146
public async ensureTerminal(preserveFocus: boolean = true): Promise<void> {
147-
let createTerminalOptions: TerminalOptions;
148-
const uri = getActiveResource();
149-
const configuration = getConfiguration('python', uri);
150-
const pythonStartupSetting = configuration.get<boolean>('terminal.shellIntegration.enabled', false);
151-
152-
if (pythonStartupSetting) {
153-
createTerminalOptions = {
154-
name: this.options?.title || 'Python',
155-
env: { PYTHONSTARTUP: this.envVarScript },
156-
hideFromUser: this.options?.hideFromUser,
157-
};
158-
} else {
159-
createTerminalOptions = {
160-
name: this.options?.title || 'Python',
161-
hideFromUser: this.options?.hideFromUser,
162-
};
163-
}
164147
if (this.terminal) {
165148
return;
166149
}
167150
this.terminalShellType = this.terminalHelper.identifyTerminalShell(this.terminal);
168-
this.terminal = this.terminalManager.createTerminal(createTerminalOptions);
151+
this.terminal = this.terminalManager.createTerminal({
152+
name: this.options?.title || 'Python',
153+
hideFromUser: this.options?.hideFromUser,
154+
});
169155
this.terminalAutoActivator.disableAutoActivation(this.terminal);
170156

171157
// Sometimes the terminal takes some time to start up before it can start accepting input.

0 commit comments

Comments
 (0)