Skip to content

Commit

Permalink
Replace the 'which' command so the 'setup' task works on Windows (#25537
Browse files Browse the repository at this point in the history
)
  • Loading branch information
FlorentClarret committed May 13, 2024
1 parent 09eaeae commit 2d60714
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tasks/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def update_dependencies(ctx) -> Iterable[SetupResult]:
def enable_pre_commit(ctx) -> SetupResult:
print(color_message("Enabling pre-commit...", "blue"))

if not ctx.run("which pre-commit", hide=True, warn=True).ok:
if not ctx.run("pre-commit --version", hide=True, warn=True).ok:
return SetupResult(
"Enable pre-commit", Status.FAIL, "Please install pre-commit first: https://pre-commit.com/#installation."
)
Expand Down

0 comments on commit 2d60714

Please sign in to comment.