mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2026-01-08 21:21:32 +00:00
Improve unseal CLI message
This commit is contained in:
@@ -33,6 +33,18 @@ func (c *UnsealCommand) Run(args []string) int {
|
||||
return 2
|
||||
}
|
||||
|
||||
sealStatus, err := client.Sys().SealStatus()
|
||||
if err != nil {
|
||||
c.Ui.Error(fmt.Sprintf(
|
||||
"Error checking seal status: %s", err))
|
||||
return 2
|
||||
}
|
||||
|
||||
if !sealStatus.Sealed {
|
||||
c.Ui.Output("Vault is already unsealed.")
|
||||
return 0
|
||||
}
|
||||
|
||||
args = flags.Args()
|
||||
|
||||
value := c.Key
|
||||
|
||||
Reference in New Issue
Block a user