mirror of
https://github.com/hashicorp/vault.git
synced 2026-05-05 12:26:34 +02:00
Fix a panic caused by a nil response on kv pre-flight (#6675)
* Fix a panic caused by a nil response on kv pre-flight * Fix imports
This commit is contained in:
parent
252aa1c528
commit
0c9b011709
@ -1,6 +1,7 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"path"
|
||||
@ -69,6 +70,9 @@ func kvPreflightVersionRequest(client *api.Client, path string) (string, int, er
|
||||
if err != nil {
|
||||
return "", 0, err
|
||||
}
|
||||
if secret == nil {
|
||||
return "", 0, errors.New("nil response from pre-flight request")
|
||||
}
|
||||
var mountPath string
|
||||
if mountPathRaw, ok := secret.Data["path"]; ok {
|
||||
mountPath = mountPathRaw.(string)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user