@@ -6,7 +6,7 @@ import { DidChangeEnvironmentEventArgs } from '../../../api';
66import { EnvironmentManagers } from '../../../internal.api' ;
77import { traceError , traceInfo } from '../../../common/logging' ;
88import { ShellStartupActivationStrings } from '../../../common/localize' ;
9- import { showInformationMessage } from '../../../common/window.apis' ;
9+ import { showErrorMessage , showInformationMessage } from '../../../common/window.apis' ;
1010
1111export interface ShellStartupActivationManager extends Disposable {
1212 initialize ( ) : Promise < void > ;
@@ -21,6 +21,7 @@ export class ShellStartupActivationManagerImpl implements ShellStartupActivation
2121 private readonly shellStartupProviders : ShellStartupProvider [ ] ,
2222 private readonly em : EnvironmentManagers ,
2323 ) {
24+ this . envCollection . description = ShellStartupActivationStrings . envCollectionDescription ;
2425 this . disposables . push (
2526 onDidChangeConfiguration ( ( e : ConfigurationChangeEvent ) => {
2627 this . handleConfigurationChange ( e ) ;
@@ -93,9 +94,10 @@ export class ShellStartupActivationManagerImpl implements ShellStartupActivation
9394 const autoActType = getAutoActivationType ( ) ;
9495 if ( autoActType === 'shellStartup' ) {
9596 if ( await this . isSetupRequired ( ) ) {
97+ const shells = this . shellStartupProviders . map ( ( provider ) => provider . name ) . join ( ', ' ) ;
9698 const result = await showInformationMessage (
9799 ShellStartupActivationStrings . shellStartupScriptEditPrompt ,
98- { modal : true } ,
100+ { modal : true , detail : ` ${ ShellStartupActivationStrings . updatingTheseProfiles } : ${ shells } ` } ,
99101 ShellStartupActivationStrings . updateScript ,
100102 ) ;
101103
@@ -143,7 +145,25 @@ export class ShellStartupActivationManagerImpl implements ShellStartupActivation
143145 }
144146
145147 public async updateStartupScripts ( ) : Promise < void > {
146- await Promise . all ( this . shellStartupProviders . map ( ( provider ) => provider . setupScripts ( ) ) ) ;
148+ const results = await Promise . all (
149+ this . shellStartupProviders . map ( async ( provider ) => {
150+ const result = await provider . setupScripts ( ) ;
151+ if ( ! result ) {
152+ traceError ( `Failed to setup shell startup scripts for ${ provider . name } ` ) ;
153+ }
154+ return result ;
155+ } ) ,
156+ ) ;
157+
158+ const success = results . every ( ( result ) => result ) ;
159+
160+ // Intentionally not awaiting this message. We don’t need a response here, and awaiting here for user response can
161+ // block setting up rest of the startup activation.
162+ if ( success ) {
163+ showInformationMessage ( ShellStartupActivationStrings . shellStartupScriptEditComplete ) ;
164+ } else {
165+ showErrorMessage ( ShellStartupActivationStrings . shellStartupScriptEditFailed ) ;
166+ }
147167 }
148168
149169 public async cleanupStartupScripts ( ) : Promise < void > {
0 commit comments