Skip to content

Commit

Permalink
Stderr progress output (#487)
Browse files Browse the repository at this point in the history
  • Loading branch information
uzaxirr authored Jan 2, 2025
1 parent 670e3e2 commit 9fdfb05
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/instance/instance_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ If you wish to use a custom format, the available fields are:
if wait {
stillCreating := true
s := spinner.New(spinner.CharSets[9], 100*time.Millisecond)
s.Writer = os.Stderr
s.Prefix = fmt.Sprintf("Creating instance (%s)... ", resp.Hostname)
s.Start()

Expand Down
1 change: 1 addition & 0 deletions cmd/instance/instance_stop.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ If you wish to use a custom format, the available fields are:
if waitStop {
stillStopping := true
s := spinner.New(spinner.CharSets[9], 100*time.Millisecond)
s.Writer = os.Stderr
s.Prefix = "Stopping instance... "
s.Start()

Expand Down
1 change: 1 addition & 0 deletions cmd/kubernetes/kubernetes_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ var kubernetesCreateCmd = &cobra.Command{

stillCreating := true
s := spinner.New(spinner.CharSets[9], 100*time.Millisecond)
s.Writer = os.Stderr
s.Prefix = fmt.Sprintf("Creating a %s node k3s cluster of %s instances called %s... ", strconv.Itoa(kubernetesCluster.NumTargetNode), kubernetesCluster.TargetNodeSize, kubernetesCluster.Name)
s.Start()

Expand Down
1 change: 1 addition & 0 deletions cmd/objectstore/objectstore_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ var objectStoreCreateCmd = &cobra.Command{
startTime := utility.StartTime()
stillCreating := true
s := spinner.New(spinner.CharSets[9], 100*time.Millisecond)
s.Writer = os.Stderr
s.Prefix = fmt.Sprintf("Creating an Object Store with maxSize %d, called %s... ", store.MaxSize, store.Name)
s.Start()

Expand Down
1 change: 1 addition & 0 deletions cmd/objectstore/objectstore_credential_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ var objectStoreCredentialCreateCmd = &cobra.Command{
startTime := utility.StartTime()
stillCreating := true
s := spinner.New(spinner.CharSets[9], 100*time.Millisecond)
s.Writer = os.Stderr
s.Prefix = fmt.Sprintf("Creating an Object Store Credential with maxSize %d, called %s... ", credential.MaxSizeGB, credential.Name)
s.Start()

Expand Down
1 change: 1 addition & 0 deletions cmd/volume/volume_attach.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ var volumeAttachCmd = &cobra.Command{

stillAttaching := true
s := spinner.New(spinner.CharSets[9], 100*time.Millisecond)
s.Writer = os.Stderr
s.Prefix = "Attaching volume to the instance... "
s.Start()

Expand Down
1 change: 1 addition & 0 deletions cmd/volume/volume_detach.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ var volumeDetachCmd = &cobra.Command{

stillDetaching := true
s := spinner.New(spinner.CharSets[9], 100*time.Millisecond)
s.Writer = os.Stderr
s.Prefix = "Detaching the volume... "
s.Start()

Expand Down

0 comments on commit 9fdfb05

Please sign in to comment.