Skip to content

Commit

Permalink
Add error logs
Browse files Browse the repository at this point in the history
  • Loading branch information
dsotirakis committed Aug 24, 2023
1 parent eea0164 commit d5a966f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions containers/base_rpm.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package containers

import (
"encoding/base64"
"log"

"dagger.io/dagger"
)
Expand All @@ -28,9 +29,13 @@ func RPMContainer(d *dagger.Client, opts *GPGOpts) *dagger.Container {
var gpgPublicKeyBase64Secret, gpgPrivateKeyBase64Secret *dagger.Secret
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 {
gpgPrivateKeyBase64Secret = d.SetSecret("gpg-private-key-base64", string(decodedGPGPrivateKeyBase64Secret))
} else {
log.Println("gpg-private-key-base64 cannot be decoded %w", err)
}
gpgPassphraseBase64Secret := d.SetSecret("gpg-passphrase-base64", opts.GPGPassphraseBase64)
return container.
Expand Down

0 comments on commit d5a966f

Please sign in to comment.