Disable relaunch in tests
This commit is contained in:
parent
755fae50ab
commit
02a5d5925b
|
@ -25,6 +25,8 @@ import { assertNoRpc } from '../utils';
|
|||
await config.update('showExitAlert', false, ConfigurationTarget.Global);
|
||||
// Canvas may cause problems when running in a container
|
||||
await config.update('rendererType', 'dom', ConfigurationTarget.Global);
|
||||
// Disable env var relaunch for tests to prevent terminals relaunching themselves
|
||||
await config.update('environmentChangesRelaunch', false, ConfigurationTarget.Global);
|
||||
});
|
||||
|
||||
suite('Terminal', () => {
|
||||
|
|
|
@ -1566,7 +1566,15 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
|
|||
|
||||
// Recreate the process if the terminal has not yet been interacted with and it's not a
|
||||
// special terminal (eg. task, extension terminal)
|
||||
if (info.requiresAction && !this._processManager.hasWrittenData && !this._shellLaunchConfig.isFeatureTerminal && !this._shellLaunchConfig.isExtensionCustomPtyTerminal && !this._shellLaunchConfig.isExtensionOwnedTerminal && !this._shellLaunchConfig.attachPersistentProcess) {
|
||||
if (
|
||||
info.requiresAction &&
|
||||
this._configHelper.config.environmentChangesRelaunch &&
|
||||
!this._processManager.hasWrittenData &&
|
||||
!this._shellLaunchConfig.isFeatureTerminal &&
|
||||
!this._shellLaunchConfig.isExtensionCustomPtyTerminal
|
||||
&& !this._shellLaunchConfig.isExtensionOwnedTerminal &&
|
||||
!this._shellLaunchConfig.attachPersistentProcess
|
||||
) {
|
||||
this.relaunch();
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -130,6 +130,7 @@ export interface ITerminalConfiguration {
|
|||
windows: { [key: string]: string };
|
||||
};
|
||||
environmentChangesIndicator: 'off' | 'on' | 'warnonly';
|
||||
environmentChangesRelaunch: boolean;
|
||||
showExitAlert: boolean;
|
||||
splitCwd: 'workspaceRoot' | 'initial' | 'inherited';
|
||||
windowsEnableConpty: boolean;
|
||||
|
|
|
@ -311,6 +311,11 @@ export const terminalConfiguration: IConfigurationNode = {
|
|||
],
|
||||
default: 'warnonly'
|
||||
},
|
||||
'terminal.integrated.environmentChangesRelaunch': {
|
||||
markdownDescription: localize('terminal.integrated.environmentChangesRelaunch', "Whether to relaunch terminals automatically if extension want to contribute to their environment and have not been interacted with yet."),
|
||||
type: 'boolean',
|
||||
default: true
|
||||
},
|
||||
'terminal.integrated.showExitAlert': {
|
||||
description: localize('terminal.integrated.showExitAlert', "Controls whether to show the alert \"The terminal process terminated with exit code\" when exit code is non-zero."),
|
||||
type: 'boolean',
|
||||
|
|
Loading…
Reference in a new issue