We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 102e7fd commit b79e5ceCopy full SHA for b79e5ce
1 file changed
git2-hooks/src/hookspath.rs
@@ -16,6 +16,7 @@ pub struct HookPaths {
16
17
const CONFIG_HOOKS_PATH: &str = "core.hooksPath";
18
const DEFAULT_HOOKS_PATH: &str = "hooks";
19
+const ENOEXEC: i32 = 8;
20
21
impl HookPaths {
22
/// `core.hooksPath` always takes precedence.
@@ -123,7 +124,7 @@ impl HookPaths {
123
124
} else {
125
// execute hook directly
126
match run_command(Command::new(&hook)) {
- Err(err) if err.raw_os_error() == Some(8) => {
127
+ Err(err) if err.raw_os_error() == Some(ENOEXEC) => {
128
run_command(sh_command(&hook))
129
}
130
result => result,
0 commit comments