make -p and -s mutually exclusive
This commit is contained in:
parent
ee984f7d72
commit
56d3c2c555
|
@ -127,6 +127,8 @@ func init() {
|
|||
|
||||
// Cobra also supports local flags, which will only run
|
||||
// when this action is called directly.
|
||||
rootCmd.Flags().StringVarP(&preset, "preset", "p", "", "Preset file to use")
|
||||
rootCmd.Flags().StringVarP(&scriptPath, "script", "s", "", "Script file to use")
|
||||
rootCmd.Flags().StringVarP(&preset, "preset", "p", "", "preset file to use")
|
||||
rootCmd.Flags().StringVarP(&scriptPath, "script", "s", "", "script file to use")
|
||||
|
||||
rootCmd.MarkFlagsMutuallyExclusive("preset", "script")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue