1
0
mirror of https://github.com/docker/docker-credential-helpers.git synced 2026-06-14 00:11:28 +05:30

pass: trim pass show output

As of 8446a40, pass show will include a newline when showing a password.
This causes the pass helper here to reliably fail to initialize since a
password doesn't round-trip.

Before making this change, the pass test would fail if the installed
password-store version was v1.7.1+, and after this change it passes
again.

Fixes #107

Signed-off-by: Euan Kemp <euank@euank.com>
This commit is contained in:
Euan Kemp
2018-06-20 17:53:21 -07:00
committed by Vincent Demeester
parent 26deb2937d
commit dd27c246bd
+2 -1
View File
@@ -58,7 +58,8 @@ func runPass(stdin string, args ...string) (string, error) {
return "", fmt.Errorf("%s: %s", err, stderr.String())
}
return stdout.String(), nil
// trim newlines; pass v1.7.1+ includes a newline at the end of `show` output
return strings.TrimRight(stdout.String(), "\n\r"), nil
}
// Pass handles secrets using Linux secret-service as a store.