Skip to content

Commit e268941

Browse files
authored
Fix rustfmt detection in pre-commit hook (arkworks-rs#304)
1 parent 53ceb2f commit e268941

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ Cargo.lock
88
*.sage.py
99
params
1010
*.swp
11-
*.swo
11+
*.swo

.hooks/pre-commit

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
if rustfmt --version &>/dev/null; then
3+
if ! command -v rustfmt &> /dev/null; then
44
printf "[pre_commit] \033[0;31merror\033[0m: \"rustfmt\" not available. \n"
55
printf "[pre_commit] \033[0;31merror\033[0m: rustfmt can be installed via - \n"
66
printf "[pre_commit] $ rustup component add rustfmt \n"

0 commit comments

Comments
 (0)