Skip to content

Commit

Permalink
Fix split by newline on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
maximbaz committed Mar 4, 2023
1 parent 1854ad9 commit fbc6b64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion helpers/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func DetectGpgRecipients(filePath string) ([]string, error) {
for {
file, err := ioutil.ReadFile(filepath.Join(dir, ".gpg-id"))
if err == nil {
return strings.Split(strings.TrimSpace(string(file)), "\n"), nil
return strings.Split(strings.ReplaceAll(strings.TrimSpace(string(file)), "\r\n", "\n"), "\n"), nil
}

if !os.IsNotExist(err) {
Expand Down

0 comments on commit fbc6b64

Please sign in to comment.