Allow parsing different section headers in libmutton.ini

This commit is contained in:
2024-07-17 14:44:18 -04:00
parent 0fc0a2cfc0
commit 2ae4fe19e8
5 changed files with 23 additions and 18 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ 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([]string{"gpgID"}, "")[0], "-e")
cmd := exec.Command("gpg", "-q", "-r", ParseConfig([][2]string{{"LIBMUTTON", "gpgID"}}, "")[0], "-e")
writeToStdin(cmd, strings.Join(input, "\n"))
encryptedBytes, err := cmd.Output()
if err != nil {