Skip to content

Commit 8cdfdec

Browse files
author
Anthony Sterling
authored
Merge pull request #7 from chrisgavin/fix-cache-dir-not-required
Fix `--cache-dir` not actually being marked as a required flag.
2 parents 282f386 + 7f01c4d commit 8cdfdec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/root.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ var (
8686

8787
func Execute(ctx context.Context) error {
8888
rootCmd.PersistentFlags().StringVar(&cacheDir, "cache-dir", "", "Directory containing the repopositories cache created by the `pull` command")
89-
_ = rootCmd.MarkFlagRequired("cache-dir")
89+
_ = rootCmd.MarkPersistentFlagRequired("cache-dir")
9090

9191
rootCmd.AddCommand(versionCmd)
9292

0 commit comments

Comments
 (0)