Skip to content

Commit 8502b53

Browse files
author
Vincent Demeester
authored
Merge pull request #108 from euank/pass-trim‮‮‮‮‮‮‮‮trim-pass
pass: trim pass show output
2 parents 26deb29 + dd27c24 commit 8502b53

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pass/pass_linux.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ func runPass(stdin string, args ...string) (string, error) {
5858
return "", fmt.Errorf("%s: %s", err, stderr.String())
5959
}
6060

61-
return stdout.String(), nil
61+
// trim newlines; pass v1.7.1+ includes a newline at the end of `show` output
62+
return strings.TrimRight(stdout.String(), "\n\r"), nil
6263
}
6364

6465
// Pass handles secrets using Linux secret-service as a store.

0 commit comments

Comments
 (0)