@@ -73,8 +73,6 @@ import { TerminalCapability } from 'vs/workbench/contrib/terminal/common/capabil
73
73
import { ITextModel } from 'vs/editor/common/model' ;
74
74
import { IModelService } from 'vs/editor/common/services/model' ;
75
75
import { ITextModelContentProvider , ITextModelService } from 'vs/editor/common/services/resolverService' ;
76
- import { IHistoryService } from 'vs/workbench/services/history/common/history' ;
77
- import { Schemas } from 'vs/base/common/network' ;
78
76
79
77
const enum Constants {
80
78
/**
@@ -352,8 +350,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
352
350
@IWorkbenchEnvironmentService workbenchEnvironmentService : IWorkbenchEnvironmentService ,
353
351
@IWorkspaceContextService private readonly _workspaceContextService : IWorkspaceContextService ,
354
352
@IEditorService private readonly _editorService : IEditorService ,
355
- @IWorkspaceTrustRequestService private readonly _workspaceTrustRequestService : IWorkspaceTrustRequestService ,
356
- @IHistoryService private readonly _historyService : IHistoryService
353
+ @IWorkspaceTrustRequestService private readonly _workspaceTrustRequestService : IWorkspaceTrustRequestService
357
354
) {
358
355
super ( ) ;
359
356
@@ -1315,16 +1312,9 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
1315
1312
if ( this . _isDisposed ) {
1316
1313
return ;
1317
1314
}
1318
- const activeWorkspaceRootUri = this . _historyService . getLastActiveWorkspaceRoot ( Schemas . file ) ;
1319
- if ( activeWorkspaceRootUri ) {
1320
- const trusted = await this . _trust ( ) ;
1321
- if ( ! trusted ) {
1322
- this . _onProcessExit ( { message : nls . localize ( 'workspaceNotTrustedCreateTerminal' , "Cannot launch a terminal process in an untrusted workspace" ) } ) ;
1323
- }
1324
- } else if ( this . _userHome && this . _cwd !== this . _userHome ) {
1325
- // ensure that the process is launched in userHome for an empty workspace
1326
- this . _shellLaunchConfig . cwd = this . _userHome ;
1327
- } else if ( ! this . _userHome ) {
1315
+
1316
+ const trusted = await this . _trust ( ) ;
1317
+ if ( ! trusted ) {
1328
1318
this . _onProcessExit ( { message : nls . localize ( 'workspaceNotTrustedCreateTerminal' , "Cannot launch a terminal process in an untrusted workspace" ) } ) ;
1329
1319
}
1330
1320
0 commit comments