mirror of
https://github.com/FalconOpsLLC/goexec
synced 2026-06-06 15:44:27 +00:00
changed metavars for global flags
This commit is contained in:
+3
-3
@@ -146,7 +146,7 @@ func init() {
|
||||
|
||||
modules := &cobra.Group{
|
||||
ID: "module",
|
||||
Title: "Execution Modules:",
|
||||
Title: "Execution Commands:",
|
||||
}
|
||||
rootCmd.AddGroup(modules)
|
||||
|
||||
@@ -156,7 +156,7 @@ func init() {
|
||||
logOpts.BoolVar(&logDebug, "debug", false, "Enable debug logging")
|
||||
logOpts.BoolVar(&logJson, "json", false, "Write logging output in JSON lines")
|
||||
logOpts.BoolVar(&logQuiet, "quiet", false, "Disable info logging")
|
||||
logOpts.StringVarP(&logOutput, "log-file", "O", "", "Write JSON logging output to file")
|
||||
logOpts.StringVarP(&logOutput, "log-file", "O", "", "Write JSON logging output to `file`")
|
||||
rootCmd.PersistentFlags().AddFlagSet(logOpts)
|
||||
flagGroups["Logging"] = logOpts
|
||||
}
|
||||
@@ -164,7 +164,7 @@ func init() {
|
||||
// Global networking flags
|
||||
{
|
||||
netOpts := pflag.NewFlagSet("Network", pflag.ExitOnError)
|
||||
netOpts.StringVarP(&proxy, "proxy", "x", "", "Proxy URL")
|
||||
netOpts.StringVarP(&proxy, "proxy", "x", "", "Proxy `URI`")
|
||||
rootCmd.PersistentFlags().AddFlagSet(netOpts)
|
||||
}
|
||||
|
||||
|
||||
+2
-3
@@ -49,12 +49,11 @@ func argsTask(*cobra.Command, []string) error {
|
||||
case tschTask == "":
|
||||
tschTask = `\` + util.RandomString()
|
||||
case tschexec.ValidateTaskPath(tschTask) == nil:
|
||||
return nil
|
||||
case tschexec.ValidateTaskName(tschTask) == nil:
|
||||
tschTask = `\` + tschTask
|
||||
default:
|
||||
return fmt.Errorf("invalid task name or path: %q", tschTask)
|
||||
}
|
||||
return nil
|
||||
return fmt.Errorf("invalid task name or path: %q", tschTask)
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
Reference in New Issue
Block a user