mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 03:27:03 -07:00
Made user and pass flags required together
This commit is contained in:
parent
e0d02e5651
commit
ac86a12ce0
1 changed files with 1 additions and 0 deletions
|
|
@ -80,6 +80,7 @@ func init() {
|
|||
collectCmd.PersistentFlags().StringVarP(&outputPath, "output", "o", fmt.Sprintf("/tmp/%smagellan/data/", currentUser.Username+"/"), "set the path to store collection data")
|
||||
collectCmd.PersistentFlags().BoolVar(&forceUpdate, "force-update", false, "set flag to force update data sent to SMD")
|
||||
collectCmd.PersistentFlags().StringVar(&cacertPath, "ca-cert", "", "path to CA cert. (defaults to system CAs)")
|
||||
collectCmd.MarkFlagsRequiredTogether("user", "pass")
|
||||
|
||||
viper.BindPFlag("collect.driver", collectCmd.Flags().Lookup("driver"))
|
||||
viper.BindPFlag("collect.host", collectCmd.Flags().Lookup("host"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue