Skip to content

Commit

Permalink
Addressed issue #155
Browse files Browse the repository at this point in the history
a nil pointer check was required in a few places.
  • Loading branch information
daveshanley committed Aug 1, 2024
1 parent c4c812c commit 4417e5a
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions cmd/summary.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,13 @@ func GetSummaryCommand() *cobra.Command {
if ok {
if !noColorFlag {
if !update.Completed {
spinner.UpdateText(update.Message)
if spinner != nil {
spinner.UpdateText(update.Message)
}
} else {
spinner.Info(update.Message)
if spinner != nil {
spinner.Info(update.Message)
}
}
}
if update.Warning {
Expand All @@ -103,12 +107,16 @@ func GetSummaryCommand() *cobra.Command {
} else {
if !failed {
if !noColorFlag {
spinner.Success("completed")
if spinner != nil {
spinner.Success("completed")
}
fmt.Println()
}
} else {
if !noColorFlag {
spinner.Fail("failed to complete. sorry!")
if spinner != nil {
spinner.Fail("failed to complete. sorry!")
}
}
}
if len(warnings) > 0 {
Expand Down

0 comments on commit 4417e5a

Please sign in to comment.