mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04:00
cli: add default value to master-secret flag in recover
This commit is contained in:
parent
19bd097864
commit
1872d52a49
@ -34,7 +34,7 @@ func newRecoverCmd() *cobra.Command {
|
|||||||
must(cmd.MarkFlagRequired("endpoint"))
|
must(cmd.MarkFlagRequired("endpoint"))
|
||||||
cmd.Flags().String("disk-uuid", "", "disk UUID of the encrypted state disk (required)")
|
cmd.Flags().String("disk-uuid", "", "disk UUID of the encrypted state disk (required)")
|
||||||
must(cmd.MarkFlagRequired("disk-uuid"))
|
must(cmd.MarkFlagRequired("disk-uuid"))
|
||||||
cmd.Flags().String("master-secret", "", "path to base64 encoded master secret")
|
cmd.Flags().String("master-secret", constants.MasterSecretFilename, "path to base64 encoded master secret")
|
||||||
return cmd
|
return cmd
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,9 +107,6 @@ func parseRecoverFlags(cmd *cobra.Command, fileHandler file.Handler) (recoverFla
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return recoverFlags{}, err
|
return recoverFlags{}, err
|
||||||
}
|
}
|
||||||
if masterSecretPath == "" {
|
|
||||||
masterSecretPath = constants.MasterSecretFilename
|
|
||||||
}
|
|
||||||
masterSecret, err := readMasterSecret(fileHandler, masterSecretPath)
|
masterSecret, err := readMasterSecret(fileHandler, masterSecretPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return recoverFlags{}, err
|
return recoverFlags{}, err
|
||||||
|
Loading…
Reference in New Issue
Block a user