Skip to content

Commit

Permalink
cmd/snap: expose debug validate-seed and debug seeding
Browse files Browse the repository at this point in the history
Expose debug commands which are used by folks already.

Signed-off-by: Maciej Borzecki <[email protected]>
  • Loading branch information
bboozzoo committed Nov 7, 2024
1 parent b19a75f commit 0cf12e0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
7 changes: 3 additions & 4 deletions cmd/snap/cmd_debug_seeding.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,12 @@ type cmdSeeding struct {
}

func init() {
cmd := addDebugCommand("seeding",
"(internal) obtain seeding and preseeding details",
"(internal) obtain seeding and preseeding details",
addDebugCommand("seeding",
"Obtain seeding and preseeding details",
"Obtain seeding and preseeding details",
func() flags.Commander {
return &cmdSeeding{}
}, nil, nil)
cmd.hidden = true
}

func (x *cmdSeeding) Execute(args []string) error {
Expand Down
12 changes: 8 additions & 4 deletions cmd/snap/cmd_debug_validate_seed.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,18 @@ type cmdValidateSeed struct {
} `positional-args:"true" required:"true"`
}

const longDebugValidateSeedHelp = `
Validate correctness of snap seed located in the directory
containing seed.yaml file.
`

func init() {
cmd := addDebugCommand("validate-seed",
"(internal) validate seed.yaml",
"(internal) validate seed.yaml",
addDebugCommand("validate-seed",
"Validate snap seed",
longDebugValidateSeedHelp,
func() flags.Commander {
return &cmdValidateSeed{}
}, nil, nil)
cmd.hidden = true
}

func (x *cmdValidateSeed) Execute(args []string) error {
Expand Down

0 comments on commit 0cf12e0

Please sign in to comment.