From 4c556792d4d67d50893205f8c2c0d94d766ff1e0 Mon Sep 17 00:00:00 2001 From: Guilherme Caulada Date: Thu, 24 Aug 2023 10:26:08 -0300 Subject: [PATCH] Revert "Fix error handling for gpg secret decoding (#127)" This reverts commit 59a698bad42ad784b4f14754ce9b03be8ac4a2e7. --- containers/base_rpm.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/containers/base_rpm.go b/containers/base_rpm.go index a258892e..8308c2dc 100644 --- a/containers/base_rpm.go +++ b/containers/base_rpm.go @@ -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)