Merge pull request #7 from chrisgavin/fix-cache-dir-not-required

Fix `--cache-dir` not actually being marked as a required flag.
This commit is contained in:
Anthony Sterling
2020-08-10 14:50:50 +01:00
committed by GitHub

View File

@@ -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)