Skip to content

Commit

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

Signed-off-by: Furkan <furkan.turkal@trendyol.com>
  • Loading branch information
Dentrax committed Jun 22, 2022
1 parent 76184c4 commit 36a4785
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 36a4785

Please sign in to comment.