mirror of
https://github.com/rwinkhart/libmutton.git
synced 2026-08-29 05:16:29 -04:00
Return errors from ParseConfig (facilitates GUI development)
This commit is contained in:
+2
-1
@@ -27,7 +27,8 @@ func DecryptGPG(targetLocation string) []string {
|
||||
|
||||
// EncryptGPG encrypts a slice of strings using GPG and returns the encrypted data as a byte slice.
|
||||
func EncryptGPG(input []string) []byte {
|
||||
cmd := exec.Command("gpg", "-q", "-r", ParseConfig([][2]string{{"LIBMUTTON", "gpgID"}}, "")[0], "-e")
|
||||
gpgCfg, _ := ParseConfig([][2]string{{"LIBMUTTON", "gpgID"}}, "")
|
||||
cmd := exec.Command("gpg", "-q", "-r", gpgCfg[0], "-e")
|
||||
writeToStdin(cmd, strings.Join(input, "\n"))
|
||||
encryptedBytes, err := cmd.Output()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user