Skip to content

Commit

Permalink
fix: build migration images should exit on error in non-interactive (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
davemooreuws authored Jan 13, 2025
1 parent bd581a2 commit 2473f6f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ var specCmd = &cobra.Command{
// non-interactive environment
for update := range migrationBuildUpdates {
for _, line := range strings.Split(strings.TrimSuffix(update.Message, "\n"), "\n") {
if update.Status == project.ServiceBuildStatus_Error {
tui.CheckErr(fmt.Errorf("error building migration images %s", update.Message))
}

fmt.Printf("%s [%s]: %s\n", update.ServiceName, update.Status, line)
}
}
Expand Down
4 changes: 4 additions & 0 deletions cmd/stack.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,10 @@ var stackUpdateCmd = &cobra.Command{
// non-interactive environment
for update := range migrationBuildUpdates {
for _, line := range strings.Split(strings.TrimSuffix(update.Message, "\n"), "\n") {
if update.Status == project.ServiceBuildStatus_Error {
tui.CheckErr(fmt.Errorf("error building migration images %s", update.Message))
}

fmt.Printf("%s [%s]: %s\n", update.ServiceName, update.Status, line)
}
}
Expand Down

0 comments on commit 2473f6f

Please sign in to comment.