Skip to content

Commit 13c9ae0

Browse files
committed
spinner
1 parent 39e59ca commit 13c9ae0

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module github.com/vmware-tanzu/tanzu-cli
33
go 1.21
44

55
replace cloud.google.com/go => cloud.google.com/go v0.102.1
6+
67
replace github.com/vmware-tanzu/tanzu-cli/test/e2e/framework => ./test/e2e/framework
78

89
require (

pkg/airgapped/plugin_bundle_upload.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"fmt"
88
"os"
99
"path/filepath"
10+
"time"
1011

1112
"github.com/pkg/errors"
1213

@@ -67,9 +68,10 @@ func (o *UploadPluginBundleOptions) UploadPluginBundle() error {
6768
if err != nil {
6869
return errors.Wrap(err, "error while constructing the repo image path")
6970
}
70-
if err = o.uploadImage(imageTar, repoImagePath, totalImages, imagesUploaded); err != nil {
71-
return err
71+
if uploadErr := o.uploadImage(imageTar, repoImagePath, totalImages, imagesUploaded); uploadErr != nil {
72+
return uploadErr
7273
}
74+
time.Sleep(3 * time.Second)
7375
imagesUploaded++
7476
}
7577
log.Infof("---------------------------")
@@ -130,7 +132,6 @@ func (o *UploadPluginBundleOptions) uploadImage(imageTar, repoImagePath string,
130132
uploadedMsg = fmt.Sprintf(uploadedMsg, totalImages, imagesUploaded+1, repoImagePath)
131133
if spinner != nil {
132134
spinner.SetFinalText(uploadedMsg, log.LogTypeINFO)
133-
spinner.StopSpinner()
134135
} else {
135136
log.Infof(uploadedMsg, totalImages, imagesUploaded, repoImagePath)
136137
}

0 commit comments

Comments
 (0)