From 1872d52a497c030059c5fd57b74de07a2170b571 Mon Sep 17 00:00:00 2001 From: Thomas Tendyck Date: Mon, 9 May 2022 11:00:16 +0200 Subject: [PATCH] cli: add default value to master-secret flag in recover --- cli/cmd/recover.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cli/cmd/recover.go b/cli/cmd/recover.go index 728756c1b..a4fa19f8a 100644 --- a/cli/cmd/recover.go +++ b/cli/cmd/recover.go @@ -34,7 +34,7 @@ func newRecoverCmd() *cobra.Command { must(cmd.MarkFlagRequired("endpoint")) cmd.Flags().String("disk-uuid", "", "disk UUID of the encrypted state disk (required)") 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 } @@ -107,9 +107,6 @@ func parseRecoverFlags(cmd *cobra.Command, fileHandler file.Handler) (recoverFla if err != nil { return recoverFlags{}, err } - if masterSecretPath == "" { - masterSecretPath = constants.MasterSecretFilename - } masterSecret, err := readMasterSecret(fileHandler, masterSecretPath) if err != nil { return recoverFlags{}, err