Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion cmd/microcloud/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func main() {

asker, err := setupAsker(ctx)
if err != nil {
fmt.Println(err.Error())
fmt.Fprintf(os.Stderr, "Failed setting up asker: %v\n", err)
os.Exit(1)
}

Expand All @@ -62,6 +62,14 @@ func main() {

app.SetVersionTemplate("{{.Version}}\n")

// Don't display the --state-dir flag in the help output.
// It is used by the snaps "microcloud" wrapper command but never by the user directly.
err = app.PersistentFlags().MarkHidden("state-dir")
Comment thread
roosterfish marked this conversation as resolved.
if err != nil {
fmt.Fprintf(os.Stderr, "Cannot hide --state-dir flag: %v\n", err)
os.Exit(1)
}

var cmdInit = cmdInit{common: &commonCmd}
app.AddCommand(cmdInit.command())

Expand Down
Loading