Skip to content

Commit

Permalink
fixing a bug for cli when namespace is in both arg and path (hashicor…
Browse files Browse the repository at this point in the history
…p#12911)

* fixing a bug for cli when namespace is in both arg and path

* Add a changelog
  • Loading branch information
hghaf099 authored and Artem Alexandrov committed Feb 4, 2022
1 parent 839002a commit cfbdb72
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions changelog/12911.txt
@@ -0,0 +1,3 @@
```release-note:bug
cli: fixes CLI requests when namespace is both provided as argument and part of the path
```
4 changes: 2 additions & 2 deletions command/kv_helpers.go
Expand Up @@ -124,8 +124,8 @@ func addPrefixToVKVPath(p, mountPath, apiPrefix string) string {
if len(partialMountPath) <= 1 || partialMountPath[1] == ""{
break
}
mountPath = partialMountPath[1]
tp = strings.TrimPrefix(p, mountPath)
mountPath = strings.TrimSuffix(partialMountPath[1], "/")
tp = strings.TrimPrefix(tp, mountPath)
}

return path.Join(mountPath, apiPrefix, tp)
Expand Down

0 comments on commit cfbdb72

Please sign in to comment.