diff options
author | Joe <rbo@gmx.us> | 2024-03-01 20:20:20 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-03-01 20:20:20 +0100 |
commit | 721d2697f777c5d8050f37f735a9b74eb69555b8 (patch) | |
tree | 041dafee9751de4ef98c33bc723347afcc697aaf /src/c_utils.go | |
parent | fuckye (diff) | |
download | hardflip-721d2697f777c5d8050f37f735a9b74eb69555b8.tar.gz hardflip-721d2697f777c5d8050f37f735a9b74eb69555b8.tar.bz2 hardflip-721d2697f777c5d8050f37f735a9b74eb69555b8.tar.xz hardflip-721d2697f777c5d8050f37f735a9b74eb69555b8.tar.zst hardflip-721d2697f777c5d8050f37f735a9b74eb69555b8.zip |
commit
Diffstat (limited to 'src/c_utils.go')
-rw-r--r-- | src/c_utils.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/c_utils.go b/src/c_utils.go index 667ecbc..8ee2fe1 100644 --- a/src/c_utils.go +++ b/src/c_utils.go @@ -158,6 +158,9 @@ func c_error_mode(msg string, err error, ui *HardUI) { // c_encrypt_str encrypts a string with the given gpgkey func c_encrypt_str(str string, gpg string) (string, error) { + if len(gpg) == 0 || gpg == "plain" { + return str, nil + } cmd := exec.Command("gpg", "-r", gpg, "-a", "-e") cmd.Stdin = strings.NewReader(str) out, err := cmd.Output() |