Skip to content

Commit 9894c89

Browse files
committed
fix(git2-hooks): CommandExt has invalid syntax in non-Windows environments
1 parent 022351d commit 9894c89

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

git2-hooks/src/hookspath.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,12 @@ impl CommandExt for Command {
213213
/// `CREATE_NO_WINDOW` flag.
214214
#[inline]
215215
fn with_no_window(&mut self) -> &mut Self {
216-
use std::os::windows::process::CommandExt;
217216
#[cfg(windows)]
218-
self.creation_flags(0x0800_0000)
217+
{
218+
use std::os::windows::process::CommandExt;
219+
self.creation_flags(0x0800_0000);
220+
}
221+
222+
self
219223
}
220224
}

0 commit comments

Comments
 (0)