Skip to content

Commit 2473f6f

Browse files
authored
fix: build migration images should exit on error in non-interactive (#846)
1 parent bd581a2 commit 2473f6f

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

cmd/debug.go

+4
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@ var specCmd = &cobra.Command{
131131
// non-interactive environment
132132
for update := range migrationBuildUpdates {
133133
for _, line := range strings.Split(strings.TrimSuffix(update.Message, "\n"), "\n") {
134+
if update.Status == project.ServiceBuildStatus_Error {
135+
tui.CheckErr(fmt.Errorf("error building migration images %s", update.Message))
136+
}
137+
134138
fmt.Printf("%s [%s]: %s\n", update.ServiceName, update.Status, line)
135139
}
136140
}

cmd/stack.go

+4
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,10 @@ var stackUpdateCmd = &cobra.Command{
256256
// non-interactive environment
257257
for update := range migrationBuildUpdates {
258258
for _, line := range strings.Split(strings.TrimSuffix(update.Message, "\n"), "\n") {
259+
if update.Status == project.ServiceBuildStatus_Error {
260+
tui.CheckErr(fmt.Errorf("error building migration images %s", update.Message))
261+
}
262+
259263
fmt.Printf("%s [%s]: %s\n", update.ServiceName, update.Status, line)
260264
}
261265
}

0 commit comments

Comments
 (0)