@@ -761,22 +761,16 @@ export class OdoImpl implements Odo {
761
761
return services ;
762
762
}
763
763
764
- public createEnv ( ) : { } {
765
- const env = { ...process . env } ;
766
- env . GLOBALODOCONFIG = path . resolve ( __dirname , '..' , '..' , 'config' , 'preference.yaml' ) ;
767
- return env ;
768
- }
769
-
770
764
public async executeInTerminal ( command : CommandText , cwd : string = process . cwd ( ) , name = 'OpenShift' ) : Promise < void > {
771
765
const [ cmd ] = `${ command } ` . split ( ' ' ) ;
772
766
const toolLocation = await ToolsConfig . detect ( cmd ) ;
773
- const terminal : Terminal = WindowUtil . createTerminal ( name , cwd , this . createEnv ( ) ) ;
767
+ const terminal : Terminal = WindowUtil . createTerminal ( name , cwd ) ;
774
768
terminal . sendText ( toolLocation === cmd ? `${ command } ` : `${ command } ` . replace ( cmd , `"${ toolLocation } "` ) , true ) ;
775
769
terminal . show ( ) ;
776
770
}
777
771
778
772
public async execute ( command : CommandText , cwd ?: string , fail = true , addEnv = { } ) : Promise < cliInstance . CliExitData > {
779
- const env = this . createEnv ( ) ;
773
+ const env = { ... process . env } ;
780
774
const commandActual = `${ command } ` ;
781
775
const commandPrivacy = `${ command . privacyMode ( true ) } ` ;
782
776
const [ cmd ] = commandActual . split ( ' ' ) ;
@@ -1032,7 +1026,7 @@ export class OdoImpl implements Odo {
1032
1026
1033
1027
async loadWorkspaceComponents ( event : WorkspaceFoldersChangeEvent ) : Promise < void > {
1034
1028
const clusters = ( await this . getClusters ( ) ) ;
1035
- if ( ! clusters || clusters . length === 0 ) return ;
1029
+ if ( ! clusters ) return ;
1036
1030
if ( event === null && workspace . workspaceFolders || event && event . added && event . added . length > 0 ) {
1037
1031
const addedFolders = event === null ? workspace . workspaceFolders : event . added ;
1038
1032
await OdoImpl . data . addContexts ( addedFolders ) ;
0 commit comments