Skip to content

Commit

Permalink
spinner
Browse files Browse the repository at this point in the history
  • Loading branch information
chandrareddyp committed Apr 24, 2024
1 parent 39e59ca commit 13c9ae0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module github.com/vmware-tanzu/tanzu-cli
go 1.21

replace cloud.google.com/go => cloud.google.com/go v0.102.1

replace github.com/vmware-tanzu/tanzu-cli/test/e2e/framework => ./test/e2e/framework

require (
Expand Down
7 changes: 4 additions & 3 deletions pkg/airgapped/plugin_bundle_upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"fmt"
"os"
"path/filepath"
"time"

"github.com/pkg/errors"

Expand Down Expand Up @@ -67,9 +68,10 @@ func (o *UploadPluginBundleOptions) UploadPluginBundle() error {
if err != nil {
return errors.Wrap(err, "error while constructing the repo image path")
}
if err = o.uploadImage(imageTar, repoImagePath, totalImages, imagesUploaded); err != nil {
return err
if uploadErr := o.uploadImage(imageTar, repoImagePath, totalImages, imagesUploaded); uploadErr != nil {
return uploadErr
}
time.Sleep(3 * time.Second)
imagesUploaded++
}
log.Infof("---------------------------")
Expand Down Expand Up @@ -130,7 +132,6 @@ func (o *UploadPluginBundleOptions) uploadImage(imageTar, repoImagePath string,
uploadedMsg = fmt.Sprintf(uploadedMsg, totalImages, imagesUploaded+1, repoImagePath)
if spinner != nil {
spinner.SetFinalText(uploadedMsg, log.LogTypeINFO)
spinner.StopSpinner()
} else {
log.Infof(uploadedMsg, totalImages, imagesUploaded, repoImagePath)
}
Expand Down

0 comments on commit 13c9ae0

Please sign in to comment.