Skip to content

Commit

Permalink
Update usage help message for mod commands (#337)
Browse files Browse the repository at this point in the history
  • Loading branch information
pskrbasu authored Apr 26, 2024
1 parent 06ddc00 commit e8ed016
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion internal/cmd/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func checkCmd[T controlinit.CheckTarget]() *cobra.Command {
AddStringSliceFlag(constants.ArgExport, nil, "Export output to file, supported formats: csv, html, json, md, nunit3, sps (snapshot), asff").
AddStringSliceFlag(constants.ArgSearchPath, nil, "Set a custom search_path (comma-separated)").
AddStringSliceFlag(constants.ArgSearchPathPrefix, nil, "Set a prefix to the current search path (comma-separated)").
AddIntFlag(constants.ArgBenchmarkTimeout, 0, "Set a the execution timeout")
AddIntFlag(constants.ArgBenchmarkTimeout, 0, "Set the benchmark execution timeout")

// for control command, add --arg
switch typeName {
Expand Down
7 changes: 4 additions & 3 deletions internal/cmd/dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import (
"encoding/json"
"errors"
"fmt"
"os"
"strings"

"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/thediveo/enumflag/v2"
Expand All @@ -27,8 +30,6 @@ import (
"github.com/turbot/powerpipe/internal/dashboardexecute"
"github.com/turbot/powerpipe/internal/initialisation"
"github.com/turbot/steampipe-plugin-sdk/v5/logging"
"os"
"strings"
)

// variable used to assign the output mode flag
Expand Down Expand Up @@ -74,7 +75,7 @@ The current mod is the working directory, or the directory specified by the --mo
// Cobra will interpret values passed to a StringSliceFlag as CSV, where args passed to StringArrayFlag are not parsed and used raw
AddStringArrayFlag(constants.ArgVariable, nil, "Specify the value of a variable").
AddStringSliceFlag(constants.ArgVarFile, nil, "Specify an .ppvar file containing variable values").
AddIntFlag(constants.ArgDashboardTimeout, 0, "Set a the dashboard execution timeout")
AddIntFlag(constants.ArgDashboardTimeout, 0, "Set the dashboard execution timeout")

return cmd
}
Expand Down
6 changes: 3 additions & 3 deletions internal/cmd/mod.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Examples:

func modInstallCmd() *cobra.Command {
var cmd = &cobra.Command{
Use: "install",
Use: "install [flags] [mod-url]",
Run: runModInstallCmd,
Short: "Install one or more mods and their dependencies",
Long: `Install one or more mods and their dependencies.
Expand Down Expand Up @@ -170,7 +170,7 @@ func getPluginVersions(ctx context.Context) *modconfig.PluginVersionMap {

func modUninstallCmd() *cobra.Command {
var cmd = &cobra.Command{
Use: "uninstall",
Use: "uninstall [flags] [mod-url]",
Run: runModUninstallCmd,
Short: "Uninstall a mod and its dependencies",
Long: `Uninstall a mod and its dependencies.
Expand Down Expand Up @@ -220,7 +220,7 @@ func runModUninstallCmd(cmd *cobra.Command, args []string) {

func modUpdateCmd() *cobra.Command {
var cmd = &cobra.Command{
Use: "update",
Use: "update [flags] [mod-url]",
Run: runModUpdateCmd,
Short: "Update one or more mods and their dependencies",
Long: `Update one or more mods and their dependencies.
Expand Down

0 comments on commit e8ed016

Please # to comment.