Skip to content

Commit

Permalink
chore: defer spinner, show message error correct
Browse files Browse the repository at this point in the history
  • Loading branch information
maxwelbm committed Oct 1, 2024
1 parent 4428c6a commit d199fdb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/cmd/deploy/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ func captureLogs(execId, token string, cmd *DeployCmd) error {
s.Suffix = " Deploying your project..."
s.FinalMSG = "Deployed finished executing\n"
s.Start() // Start the spinner
defer s.Stop()

// Create a new HTTP request
req, err := http.NewRequest("GET", logsURL, bytes.NewBuffer([]byte{}))
Expand Down Expand Up @@ -311,7 +312,7 @@ func captureLogs(execId, token string, cmd *DeployCmd) error {
}

if Result.Result.Errors != nil {
return errors.New(fmt.Sprintf("\n%s", Result.Result.Errors.Stack)) //TODO: add mensagem que deu ruim e é para verificar se criou algo na conta
return errors.New(Result.Result.Errors.Stack) //TODO: add mensagem que deu ruim e é para verificar se criou algo na conta
}

err = cmd.WriteAzionJsonContent(Result.Result.Azion, ProjectConf)
Expand Down

0 comments on commit d199fdb

Please sign in to comment.