@@ -171,7 +171,7 @@ export default class OrgCreateScratch extends SfCommand<ScratchCreateResponse> {
171171 flags [ 'client-id' ] ? await this . secretPrompt ( { message : messages . getMessage ( 'prompt.secret' ) } ) : undefined
172172 ) ;
173173
174- const stager = new MultiStageOutput < ScratchOrgLifecycleEvent & { alias : string | undefined } > ( {
174+ const mso = new MultiStageOutput < ScratchOrgLifecycleEvent & { alias : string | undefined } > ( {
175175 stages : flags . async ? [ 'prepare request' , 'send request' , 'done' ] : scratchOrgLifecycleStages ,
176176 title : flags . async ? 'Creating Scratch Org (async)' : 'Creating Scratch Org' ,
177177 data : { alias : flags . alias } ,
@@ -207,9 +207,9 @@ export default class OrgCreateScratch extends SfCommand<ScratchCreateResponse> {
207207 } ) ;
208208
209209 lifecycle . on < ScratchOrgLifecycleEvent > ( scratchOrgLifecycleEventName , async ( data ) : Promise < void > => {
210- stager . goto ( data . stage , data ) ;
210+ mso . skipTo ( data . stage , data ) ;
211211 if ( data . stage === 'done' ) {
212- stager . stop ( ) ;
212+ mso . stop ( ) ;
213213 }
214214 return Promise . resolve ( ) ;
215215 } ) ;
@@ -222,16 +222,16 @@ export default class OrgCreateScratch extends SfCommand<ScratchCreateResponse> {
222222 }
223223
224224 if ( flags . async ) {
225- stager . goto ( 'done' , { scratchOrgInfo } ) ;
226- stager . stop ( ) ;
225+ mso . skipTo ( 'done' , { scratchOrgInfo } ) ;
226+ mso . stop ( ) ;
227227 this . info ( messages . getMessage ( 'action.resume' , [ this . config . bin , scratchOrgInfo . Id ] ) ) ;
228228 } else {
229229 this . logSuccess ( messages . getMessage ( 'success' ) ) ;
230230 }
231231
232232 return { username, scratchOrgInfo, authFields, warnings, orgId : authFields ?. orgId } ;
233233 } catch ( error ) {
234- stager . stop ( error as Error ) ;
234+ mso . error ( ) ;
235235 if ( error instanceof SfError && error . name === 'ScratchOrgInfoTimeoutError' ) {
236236 const scratchOrgInfoId = ( error . data as { scratchOrgInfoId : string } ) . scratchOrgInfoId ;
237237 const resumeMessage = messages . getMessage ( 'action.resume' , [ this . config . bin , scratchOrgInfoId ] ) ;
0 commit comments