Skip to content

Commit

Permalink
build: loadInputs: remove redundant check for hasDigest
Browse files Browse the repository at this point in the history
hasDigest would always be true when reaching this code, because the function
would return with an error when failing to resolve the digest;

    if !hasDigest {
        return nil, errors.Errorf("oci-layout reference %q could not be resolved", v.Path)
    }

Signed-off-by: Sebastiaan van Stijn <[email protected]>
  • Loading branch information
thaJeztah committed May 25, 2024
1 parent c0a986b commit 17c0a37
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions build/opt.go
Original file line number Diff line number Diff line change
Expand Up @@ -542,12 +542,7 @@ func loadInputs(ctx context.Context, d *driver.DriverHandle, inp Inputs, addVCSL
}
target.OCIStores[storeName] = store

layout := "oci-layout://" + storeName + ":" + tag
if hasDigest {
layout += "@" + dig
}

target.FrontendAttrs["context:"+k] = layout
target.FrontendAttrs["context:"+k] = "oci-layout://" + storeName + ":" + tag + "@" + dig
continue
}
st, err := os.Stat(v.Path)
Expand Down

0 comments on commit 17c0a37

Please sign in to comment.