Skip to content

Commit

Permalink
Merge pull request #7 from chrisgavin/fix-cache-dir-not-required
Browse files Browse the repository at this point in the history
Fix `--cache-dir` not actually being marked as a required flag.
  • Loading branch information
Anthony Sterling committed Aug 10, 2020
2 parents 282f386 + 7f01c4d commit 8cdfdec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 8cdfdec

Please sign in to comment.