Skip to content

Commit

Permalink
sign-blob: bundle should work independently (#2016)
Browse files Browse the repository at this point in the history
Fixes #1821
Fixes #2005

Signed-off-by: Furkan <[email protected]>
  • Loading branch information
Dentrax authored Jun 23, 2022
1 parent c8c9127 commit 4e282fd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/cosign/cli/sign/sign_blob.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@ func SignBlobCmd(ro *options.RootOptions, ko options.KeyOpts, regOpts options.Re
if err != nil {
return nil, err
}
return []byte(signedPayload.Base64Signature), os.WriteFile(ko.BundlePath, contents, 0600)
if err := os.WriteFile(ko.BundlePath, contents, 0600); err != nil {
return nil, fmt.Errorf("create bundle file: %w", err)
}
fmt.Printf("Bundle wrote in the file %s\n", ko.BundlePath)
}

if outputSignature != "" {
Expand Down

0 comments on commit 4e282fd

Please sign in to comment.