From d199fdb4f63543a3ac00d7ba9729ac3ba6a2baeb Mon Sep 17 00:00:00 2001 From: maxwelbm Date: Tue, 1 Oct 2024 12:07:25 -0300 Subject: [PATCH] chore: defer spinner, show message error correct --- pkg/cmd/deploy/deploy.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/cmd/deploy/deploy.go b/pkg/cmd/deploy/deploy.go index e420ab5f8..5607d5881 100644 --- a/pkg/cmd/deploy/deploy.go +++ b/pkg/cmd/deploy/deploy.go @@ -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{})) @@ -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)