Skip to content

Commit

Permalink
cmd/fix: Only requuire git when dry-run unset
Browse files Browse the repository at this point in the history
Fixes #1063

Signed-off-by: Charlie Egan <[email protected]>
  • Loading branch information
charlieegan3 committed Sep 5, 2024
1 parent 410d775 commit 4467dfc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/fix.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ func fix(args []string, params *fixCommandParams) error {
return fmt.Errorf("failed to establish git repo: %w", err)
}

if gitRepo == "" && !params.force {
if gitRepo == "" && !params.dryRun && !params.force {
return errors.New("no git repo found to support undo, use --force to override")
}

Expand Down

0 comments on commit 4467dfc

Please sign in to comment.