Skip to content

Commit

Permalink
Revert "Fix error handling for gpg secret decoding (#127)"
Browse files Browse the repository at this point in the history
This reverts commit 59a698b.
  • Loading branch information
guicaulada committed Aug 24, 2023
1 parent 8e8232d commit 4c55679
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions containers/base_rpm.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ func RPMContainer(d *dagger.Client, opts *GPGOpts) *dagger.Container {
return container
}
var gpgPublicKeyBase64Secret, gpgPrivateKeyBase64Secret *dagger.Secret
if decodedGPGPublicKeyBase64Secret, err := base64.StdEncoding.DecodeString(opts.GPGPublicKeyBase64); err == nil {
if decodedGPGPublicKeyBase64Secret, err := base64.StdEncoding.DecodeString(opts.GPGPublicKeyBase64); err != nil {
gpgPublicKeyBase64Secret = d.SetSecret("gpg-public-key-base64", string(decodedGPGPublicKeyBase64Secret))
} else {
log.Println("gpg-public-key-base64 cannot be decoded %w", err)
}
if decodedGPGPrivateKeyBase64Secret, err := base64.StdEncoding.DecodeString(opts.GPGPrivateKeyBase64); err == nil {
if decodedGPGPrivateKeyBase64Secret, err := base64.StdEncoding.DecodeString(opts.GPGPrivateKeyBase64); err != nil {
gpgPrivateKeyBase64Secret = d.SetSecret("gpg-private-key-base64", string(decodedGPGPrivateKeyBase64Secret))
} else {
log.Println("gpg-private-key-base64 cannot be decoded %w", err)
Expand Down

0 comments on commit 4c55679

Please sign in to comment.