mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-05 07:45:27 -04:00
cli: fix constellation verify
depending on an initialized constellation-state.yaml
file (#3184)
* Ignore missing state file if flags are provided * Update verify docs to include requirement for config file --------- Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
parent
e71819eb62
commit
09d19fec22
5 changed files with 19 additions and 5 deletions
|
@ -138,10 +138,7 @@ func (c *verifyCmd) verify(cmd *cobra.Command, verifyClient verifyClient, config
|
|||
|
||||
stateFile, err := state.ReadFromFile(c.fileHandler, constants.StateFilename)
|
||||
if err != nil {
|
||||
return fmt.Errorf("reading state file: %w", err)
|
||||
}
|
||||
if err := stateFile.Validate(state.PostInit, conf.GetAttestationConfig().GetVariant()); err != nil {
|
||||
return fmt.Errorf("validating state file: %w", err)
|
||||
stateFile = state.New() // A state file is only required if the user has not provided IP or ID flags
|
||||
}
|
||||
|
||||
ownerID, clusterID, err := c.validateIDFlags(cmd, stateFile)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue