Fix KV list command with whitespaces (#8017)

* Fix KV list command with whitespaces

* Fix kv list whitespace

* Fix list whitespace

* Fix failing test

Co-authored-by: swayne275 <swayne@hashicorp.com>
This commit is contained in:
Michel Vocks
2020-11-23 20:38:14 +01:00
committed by GitHub
parent c101a91b9c
commit 60f44132a1
4 changed files with 16 additions and 4 deletions

View File

@@ -36,7 +36,7 @@ func extractListData(secret *api.Secret) ([]interface{}, bool) {
// sanitizePath removes any leading or trailing things from a "path".
func sanitizePath(s string) string {
return ensureNoTrailingSlash(ensureNoLeadingSlash(strings.TrimSpace(s)))
return ensureNoTrailingSlash(ensureNoLeadingSlash(s))
}
// ensureTrailingSlash ensures the given string has a trailing slash.