Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add spinner during atmos validate component operations #1047

Merged
merged 2 commits into from
Feb 11, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading