Commit 85d4c6f7 authored by Andy Cobaugh's avatar Andy Cobaugh

wait: use StringSlice instead of StringArray, and bind the urls flag in PreRunE

parent eae26c95
......@@ -47,6 +47,12 @@ var ciWaitCmd = &cobra.Command{
if err != nil {
return err
}
err = viper.BindPFlag("urls", cmd.PersistentFlags().Lookup("urls"))
if err != nil {
return err
}
return nil
},
}
......@@ -66,7 +72,7 @@ type ciWaitBaseURLData struct {
}
func init() {
ciWaitCmd.PersistentFlags().StringArrayP("urls", "u", ciWaitURLsDefault, "List of URL templates to check in order to find version endpoint")
ciWaitCmd.PersistentFlags().StringSliceP("urls", "u", ciWaitURLsDefault, "List of URL templates to check in order to find version endpoint")
ciWaitCmd.PersistentFlags().Int("url-max-tries", 10, "Max tries to locate the version endpoint")
ciWaitCmd.PersistentFlags().Duration("url-delay", 10*time.Second, "Time to wait between attempts to locate version endpoint")
ciWaitCmd.PersistentFlags().Int("update-max-tries", 30, "Max tries to check version endpoint for the update")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment