@@ -61,7 +61,7 @@ async function isStartupSetup(profile: string, key: string): Promise<ShellSetupS
6161 }
6262}
6363
64- async function setupStartup ( profile : string , key : string ) : Promise < boolean > {
64+ async function setupStartup ( profile : string , key : string , name : string ) : Promise < boolean > {
6565 const activationContent = getActivationContent ( key ) ;
6666
6767 try {
@@ -72,16 +72,16 @@ async function setupStartup(profile: string, key: string): Promise<boolean> {
7272 if ( ! ( await fs . pathExists ( profile ) ) ) {
7373 // Create new profile with our content
7474 await fs . writeFile ( profile , activationContent ) ;
75- traceInfo ( `SHELL: Created new profile at: ${ profile } \n${ activationContent } ` ) ;
75+ traceInfo ( `SHELL: Created new ${ name } profile at: ${ profile } \n${ activationContent } ` ) ;
7676 } else {
7777 // Update existing profile
7878 const content = await fs . readFile ( profile , 'utf8' ) ;
7979 if ( ! content . includes ( key ) ) {
8080 await fs . writeFile ( profile , `${ content } ${ activationContent } ` ) ;
81- traceInfo ( `SHELL: Updated existing profile at: ${ profile } \n${ activationContent } ` ) ;
81+ traceInfo ( `SHELL: Updated existing ${ name } profile at: ${ profile } \n${ activationContent } ` ) ;
8282 } else {
8383 // Already contains our activation code
84- traceInfo ( `SHELL: Profile already contains activation code at: ${ profile } ` ) ;
84+ traceInfo ( `SHELL: ${ name } profile already contains activation code at: ${ profile } ` ) ;
8585 }
8686 }
8787 return true ;
@@ -161,7 +161,7 @@ export class BashStartupProvider implements ShellStartupProvider {
161161
162162 try {
163163 const bashProfiles = await getBashProfiles ( ) ;
164- const result = await setupStartup ( bashProfiles , this . bashActivationEnvVarKey ) ;
164+ const result = await setupStartup ( bashProfiles , this . bashActivationEnvVarKey , this . name ) ;
165165 return result ? ShellScriptEditState . Edited : ShellScriptEditState . NotEdited ;
166166 } catch ( err ) {
167167 traceError ( 'Failed to setup bash startup scripts' , err ) ;
@@ -255,7 +255,7 @@ export class ZshStartupProvider implements ShellStartupProvider {
255255 }
256256 try {
257257 const zshProfiles = await getZshProfiles ( ) ;
258- const result = await setupStartup ( zshProfiles , this . zshActivationEnvVarKey ) ;
258+ const result = await setupStartup ( zshProfiles , this . zshActivationEnvVarKey , this . name ) ;
259259 return result ? ShellScriptEditState . Edited : ShellScriptEditState . NotEdited ;
260260 } catch ( err ) {
261261 traceError ( 'Failed to setup zsh startup scripts' , err ) ;
@@ -347,7 +347,7 @@ export class GitBashStartupProvider implements ShellStartupProvider {
347347
348348 try {
349349 const bashProfiles = await getBashProfiles ( ) ;
350- const result = await setupStartup ( bashProfiles , this . gitBashActivationEnvVarKey ) ;
350+ const result = await setupStartup ( bashProfiles , this . gitBashActivationEnvVarKey , this . name ) ;
351351 return result ? ShellScriptEditState . Edited : ShellScriptEditState . NotEdited ;
352352 } catch ( err ) {
353353 traceError ( 'Failed to setup git bash startup scripts' , err ) ;
0 commit comments