Compare commits
5 Commits
v202007141
...
v202008101
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bc20d5071b | ||
|
|
27d5069550 | ||
|
|
8cdfdec64a | ||
|
|
732ce15227 | ||
|
|
7f01c4dc4d |
@@ -86,7 +86,7 @@ var (
|
||||
|
||||
func Execute(ctx context.Context) error {
|
||||
rootCmd.PersistentFlags().StringVar(&cacheDir, "cache-dir", "", "Directory containing the repopositories cache created by the `pull` command")
|
||||
_ = rootCmd.MarkFlagRequired("cache-dir")
|
||||
_ = rootCmd.MarkPersistentFlagRequired("cache-dir")
|
||||
|
||||
rootCmd.AddCommand(versionCmd)
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ func (f *PullFlags) Init(cmd *cobra.Command) {
|
||||
func (f *PullFlags) Validate() Validations {
|
||||
var validations Validations
|
||||
if !f.HasAtLeastOneRepoFlag() {
|
||||
validations = append(validations, "one of -repo-name, -repo-name-list, -repo-name-list-file must be set")
|
||||
validations = append(validations, "one of --repo-name, --repo-name-list, --repo-name-list-file must be set")
|
||||
}
|
||||
return validations
|
||||
}
|
||||
|
||||
@@ -30,10 +30,10 @@ func (f *PushFlags) Init(cmd *cobra.Command) {
|
||||
func (f *PushFlags) Validate() Validations {
|
||||
var validations Validations
|
||||
if f.BaseURL == "" {
|
||||
validations = append(validations, "-baseURL must be set")
|
||||
validations = append(validations, "--destination-url must be set")
|
||||
}
|
||||
if f.Token == "" {
|
||||
validations = append(validations, "-token must be set")
|
||||
validations = append(validations, "--destination-token must be set")
|
||||
}
|
||||
return validations
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user