aboutsummaryrefslogtreecommitdiff
path: root/crates/tools
diff options
context:
space:
mode:
Diffstat (limited to 'crates/tools')
-rw-r--r--crates/tools/src/lib.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/tools/src/lib.rs b/crates/tools/src/lib.rs
index 1e29c63d4..11b52ccb7 100644
--- a/crates/tools/src/lib.rs
+++ b/crates/tools/src/lib.rs
@@ -115,7 +115,11 @@ pub fn install_rustfmt() -> Result<()> {
115} 115}
116 116
117pub fn install_format_hook() -> Result<()> { 117pub fn install_format_hook() -> Result<()> {
118 let result_path = Path::new("./.git/hooks/pre-commit"); 118 let result_path = Path::new(if cfg!(windows) {
119 "./.git/hooks/pre-commit.exe"
120 } else {
121 "./.git/hooks/pre-commit"
122 });
119 if !result_path.exists() { 123 if !result_path.exists() {
120 run("cargo build --package tools --bin pre-commit", ".")?; 124 run("cargo build --package tools --bin pre-commit", ".")?;
121 if cfg!(windows) { 125 if cfg!(windows) {