mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-30 02:02:43 +00:00
fixing a bug for cli when namespace is in both arg and path (#12911)
* fixing a bug for cli when namespace is in both arg and path * Add a changelog
This commit is contained in:
3
changelog/12911.txt
Normal file
3
changelog/12911.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
```release-note:bug
|
||||
cli: fixes CLI requests when namespace is both provided as argument and part of the path
|
||||
```
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user