Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(help): Update the documentation for global flags #203

Merged
merged 1 commit into from
Jul 23, 2024
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
20 changes: 16 additions & 4 deletions cmd/ie/commands/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,28 @@ var rootCommand = &cobra.Command{
// Entrypoint into the Innovation Engine CLI.
func ExecuteCLI() {
rootCommand.PersistentFlags().
String("log-level", string(logging.Debug), "Configure the log level")
String(
"log-level",
string(logging.Debug),
"Configure the log level for statements written to ie.log. Valid options are 'trace', 'debug', 'info', 'warn', 'error', 'fatal'",
)
rootCommand.PersistentFlags().
String("environment", environments.EnvironmentsLocal, "The environment that the CLI is running in. (local, ci, ocd)")
String(
"environment",
environments.EnvironmentsLocal,
"The environment that the CLI is running in. Valid options are 'local', 'github-actions'. For running ie in your standard terminal, local will work just fine. If using IE inside a github action, use github-actions.",
)

rootCommand.PersistentFlags().
StringArray("feature", []string{}, "Enables the specified feature. Format: --feature <feature>")
StringArray(
"feature",
[]string{},
"Enables the specified feature. Format: --feature <feature>",
)

if err := rootCommand.Execute(); err != nil {
fmt.Println(err)
logging.GlobalLogger.Errorf("Error executing command: %s", err)
logging.GlobalLogger.Errorf("Failed to execute ie: %s", err)
os.Exit(1)
}
}
Loading