Skip to content

Commit

Permalink
Return an error when a bake target's project ID is unknown
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobwgillespie committed Jun 10, 2024
1 parent 32be78c commit 29a953a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/buildx/bake/bake.go
Original file line number Diff line number Diff line change
Expand Up @@ -947,6 +947,9 @@ func NewDepotBakeOptions(defaultProjectID string, targets map[string]*Target, in
if projectID == "" {
projectID = defaultProjectID
}
if projectID == "" {
return nil, errors.Errorf("Project ID is missing for target %s, please specify with --project, DEPOT_PROJECT_ID, or run `depot init`", targetName)
}
buildOpt, err := toBuildOpt(target, input)
if err != nil {
return nil, err
Expand Down

0 comments on commit 29a953a

Please sign in to comment.