Skip to content

Commit af77c81

Browse files
committed
feat: allow pulling if build savedForLoad
1 parent 6f79bb3 commit af77c81

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Diff for: pkg/cmd/pull/options.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ import (
1212
"golang.org/x/exp/slices"
1313
)
1414

15-
func isSavedBuild(options []*cliv1.BuildOptions) bool {
15+
func isSavedBuild(options []*cliv1.BuildOptions, savedForLoad bool) bool {
1616
for _, opt := range options {
1717
if opt.Save {
1818
return true
1919
}
2020
}
21-
return false
21+
return savedForLoad
2222
}
2323

2424
func isBake(options []*cliv1.BuildOptions) bool {

Diff for: pkg/cmd/pull/pull.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ func NewCmdPull() *cobra.Command {
103103
}
104104

105105
buildOptions := res.Msg.Options
106-
if len(buildOptions) > 0 && !isSavedBuild(buildOptions) {
106+
savedForLoad := res.Msg.SaveForLoad
107+
if len(buildOptions) > 0 && !isSavedBuild(buildOptions, savedForLoad) {
107108
return fmt.Errorf("build %s is not a saved build. To use the registry use --save when building", buildID)
108109
}
109110

0 commit comments

Comments
 (0)