@@ -8,19 +8,19 @@ import { getCommandAsString } from '../utils';
88import { BASH_ENV_KEY , ZSH_ENV_KEY } from './bashConstants' ;
99
1010export class BashEnvsProvider implements ShellEnvsProvider {
11- constructor ( public readonly shell : 'bash' | 'gitbash' ) { }
11+ constructor ( public readonly shellType : 'bash' | 'gitbash' ) { }
1212
1313 async updateEnvVariables ( collection : EnvironmentVariableCollection , env : PythonEnvironment ) : Promise < void > {
1414 try {
15- const bashActivation = getActivationCommandForShell ( env , this . shell ) ;
15+ const bashActivation = getActivationCommandForShell ( env , this . shellType ) ;
1616 if ( bashActivation ) {
1717 const command = getCommandAsString ( bashActivation , '&&' ) ;
1818 collection . replace ( BASH_ENV_KEY , command ) ;
1919 } else {
2020 collection . delete ( BASH_ENV_KEY ) ;
2121 }
2222 } catch ( err ) {
23- traceError ( `Failed to update env variables for ${ this . shell } ` , err ) ;
23+ traceError ( `Failed to update env variables for ${ this . shellType } ` , err ) ;
2424 collection . delete ( BASH_ENV_KEY ) ;
2525 }
2626 }
@@ -42,13 +42,14 @@ export class BashEnvsProvider implements ShellEnvsProvider {
4242 }
4343 return undefined ;
4444 } catch ( err ) {
45- traceError ( `Failed to get env variables for ${ this . shell } ` , err ) ;
45+ traceError ( `Failed to get env variables for ${ this . shellType } ` , err ) ;
4646 return undefined ;
4747 }
4848 }
4949}
5050
5151export class ZshEnvsProvider implements ShellEnvsProvider {
52+ public readonly shellType : string = ShellConstants . ZSH ;
5253 async updateEnvVariables ( envVars : EnvironmentVariableCollection , env : PythonEnvironment ) : Promise < void > {
5354 try {
5455 const zshActivation = getActivationCommandForShell ( env , ShellConstants . ZSH ) ;
0 commit comments