aboutsummaryrefslogtreecommitdiffstats
path: root/src/c_utils.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/c_utils.go')
-rw-r--r--src/c_utils.go3
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()