@@ -10,7 +10,6 @@ import (
1010 "encoding/json"
1111 "fmt"
1212 "io"
13- "net/url"
1413 "os"
1514 "path/filepath"
1615 "sort"
@@ -77,19 +76,9 @@ func (r *Runner) planBuild(ctx context.Context, build desiredBuild) (Action, err
7776 return action , nil
7877 }
7978
80- _ , err = r .client .Images .Get (ctx , url .PathEscape (build .Image ), r .opts ... )
81- if err == nil {
82- action .Action = "unchanged"
83- action .Reason = "image already exists"
84- action .buildInput .ImageRef = build .Image
85- return action , nil
86- }
87- if isHTTPNotFound (err ) {
88- action .Action = "create"
89- action .Reason = "image missing"
90- return action , nil
91- }
92- return Action {}, fmt .Errorf ("check build image %s: %w" , build .Image , err )
79+ action .Action = "create"
80+ action .Reason = "build missing"
81+ return action , nil
9382}
9483
9584func (r * Runner ) findReadyBuild (ctx context.Context , build desiredBuild ) (* hypeman.Build , error ) {
@@ -140,7 +129,11 @@ func (r *Runner) runBuild(ctx context.Context, build desiredBuild, verbose bool)
140129 if err != nil {
141130 return "" , err
142131 }
143- return runnableBuildImage (readyBuild ), nil
132+ imageRef := runnableBuildImage (readyBuild )
133+ if imageRef == "" {
134+ return "" , fmt .Errorf ("build %s did not report a runnable image" , started .ID )
135+ }
136+ return imageRef , nil
144137}
145138
146139func (r * Runner ) waitBuildReady (ctx context.Context , buildID string ) (* hypeman.Build , error ) {
0 commit comments