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

push: properly return a non-nil error when the build is incomplete #147

Merged
merged 1 commit into from Aug 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 2 additions & 6 deletions cmd/push.go
Expand Up @@ -54,11 +54,7 @@ Tip: Use the .spaceignore file to exclude certain files and directories from bei
skipLogs, _ := cmd.Flags().GetBool("skip-logs")
experimental, _ := cmd.Flags().GetBool("experimental")

err := push(projectID, projectDir, pushTag, openInBrowser, skipLogs, experimental)
if err != nil {
return err
}
return nil
return push(projectID, projectDir, pushTag, openInBrowser, skipLogs, experimental)
},
}

Expand Down Expand Up @@ -195,7 +191,7 @@ func push(projectID, projectDir, pushTag string, openInBrowser, skipLogs, experi
}
if b.Status != api.Complete {
utils.Logger.Println(styles.Errorf("\n%s Failed to push code and create a revision. Please try again!", emoji.ErrorExclamation))
return err
return fmt.Errorf("build isn't complete")
}

// get promotion via build id (build id == revision id)
Expand Down