Skip to content

Commit

Permalink
Resolves #465 - Allow variable descriptions to be empty in runbooks
Browse files Browse the repository at this point in the history
  • Loading branch information
steve-r-west committed Aug 11, 2024
1 parent 6728f41 commit 5a53370
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmd/runbooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,13 @@ func processRunbookVariablesOnCommand(runbookActionRunActionCommand *cobra.Comma
log.Errorf("Could not set flag as required, this is a bug of some kind %s: %v", key, err)
}
} else {
runbookActionRunActionCommand.Flags().StringVar(runbookStringArguments[key], key, variable.Default, variable.Description.Short)
description := ""

if variable.Description != nil {
description = variable.Description.Short
}

runbookActionRunActionCommand.Flags().StringVar(runbookStringArguments[key], key, variable.Default, description)
}

runbookActionRunActionCommand.RegisterFlagCompletionFunc(key, func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
Expand Down

0 comments on commit 5a53370

Please sign in to comment.