diff options
Diffstat (limited to 'crates/tools/src/lib.rs')
-rw-r--r-- | crates/tools/src/lib.rs | 6 |
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 | ||
117 | pub fn install_format_hook() -> Result<()> { | 117 | pub 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) { |