Skip to content

Commit

Permalink
chore: add ci to the blacklist
Browse files Browse the repository at this point in the history
  • Loading branch information
CristhianF7 committed Nov 15, 2024
1 parent 988787e commit f1e68ea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions internal/progress/progress.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func NewModel() progressModel {
func InitializeProgressTerminal(isCi bool) {
isCiExecution = isCi
if !isCiExecution {
fmt.Println("isCiExecution", isCiExecution)
Progress = tea.NewProgram(NewModel())
} else {
Progress = tea.NewProgram(NewModel(), tea.WithOutput(os.Stdout), tea.WithoutRenderer())
Expand Down
9 changes: 7 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
func main() {
argsWithProg := os.Args

bubbleTeaBlacklist := []string{"completion", "help", "--help", "-h", "quota", "logs", "--ci"}
bubbleTeaBlacklist := []string{"completion", "help", "--help", "-h", "quota", "logs"}
isCiExecution := slices.Contains(argsWithProg, "--ci")
canRunBubbleTea := true

Expand Down Expand Up @@ -146,7 +146,12 @@ func main() {
cmd.Execute()
}()

progress.Progress.Run()
_, err := progress.Progress.Run()
if err != nil {
log.Error().Msgf("error running progress: %v", err)
}

fmt.Println("finished")
} else {
cmd.Execute()
}
Expand Down

0 comments on commit f1e68ea

Please sign in to comment.