Skip to content

Commit

Permalink
feat: add spinner for component validation operations (#1047)
Browse files Browse the repository at this point in the history
  • Loading branch information
RoseSecurity authored Feb 11, 2025
1 parent a155dd3 commit 145bfe1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions internal/exec/validate_component.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ func ExecuteValidateComponentCmd(cmd *cobra.Command, args []string) (string, str

componentName := args[0]

// Initialize spinner
message := fmt.Sprintf("Validating Atmos Component: %s", componentName)
p := NewSpinner(message)
spinnerDone := make(chan struct{})
// Run spinner in a goroutine
RunSpinner(p, spinnerDone, message)
// Ensure spinner is stopped before returning
defer StopSpinner(p, spinnerDone)

flags := cmd.Flags()

stack, err := flags.GetString("stack")
Expand Down

0 comments on commit 145bfe1

Please sign in to comment.