@@ -444,13 +444,13 @@ func installComponent(args []string) (err error) {
444444
445445 stageClose , err := catalog .Stage (component , versionArg , progressClosure )
446446 defer stageClose ()
447+ downloadComplete <- 0
448+
447449 if err != nil {
448450 cli .StopProgress ()
449451 return
450452 }
451453
452- downloadComplete <- 0
453-
454454 params ["stage_duration_ms" ] = time .Since (start ).Milliseconds ()
455455 cli .Event .FeatureData = params
456456
@@ -633,13 +633,12 @@ func updateComponent(args []string) (err error) {
633633
634634 stageClose , err := catalog .Stage (component , versionArg , progressClosure )
635635 defer stageClose ()
636+ downloadComplete <- 0
636637 if err != nil {
637638 cli .StopProgress ()
638639 return
639640 }
640641
641- downloadComplete <- 0
642-
643642 params ["stage_duration_ms" ] = time .Since (start ).Milliseconds ()
644643 cli .Event .FeatureData = params
645644
@@ -923,14 +922,13 @@ func prototypeRunComponentsInstall(_ *cobra.Command, args []string) (err error)
923922
924923 cli .StartProgress (fmt .Sprintf ("Installing component %s..." , component .Name ))
925924 err = cli .LwComponents .Install (component , version , progressClosure )
925+ downloadComplete <- 0
926926 cli .StopProgress ()
927927 if err != nil {
928928 err = errors .Wrap (err , "unable to install component" )
929929 return
930930 }
931931
932- downloadComplete <- 0
933-
934932 cli .OutputChecklist (successIcon , "Component %s installed\n " , color .HiYellowString (component .Name ))
935933
936934 params ["install_duration_ms" ] = time .Since (start ).Milliseconds ()
@@ -1025,14 +1023,13 @@ func prototypeRunComponentsUpdate(args []string) (err error) {
10251023
10261024 cli .StartProgress (fmt .Sprintf ("Updating component %s to version %s..." , component .Name , & updateTo ))
10271025 err = cli .LwComponents .Install (component , updateTo .String (), progressClosure )
1026+ downloadComplete <- 0
10281027 cli .StopProgress ()
10291028 if err != nil {
10301029 err = errors .Wrap (err , "unable to update component" )
10311030 return
10321031 }
10331032
1034- downloadComplete <- 0
1035-
10361033 cli .OutputChecklist (successIcon , "Component %s updated to %s\n " ,
10371034 color .HiYellowString (component .Name ),
10381035 color .HiCyanString (fmt .Sprintf ("v%s" , updateTo .String ())))
0 commit comments