Skip to content

Commit b79e5ce

Browse files
committed
name const
1 parent 102e7fd commit b79e5ce

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

git2-hooks/src/hookspath.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ pub struct HookPaths {
1616

1717
const CONFIG_HOOKS_PATH: &str = "core.hooksPath";
1818
const DEFAULT_HOOKS_PATH: &str = "hooks";
19+
const ENOEXEC: i32 = 8;
1920

2021
impl HookPaths {
2122
/// `core.hooksPath` always takes precedence.
@@ -123,7 +124,7 @@ impl HookPaths {
123124
} else {
124125
// execute hook directly
125126
match run_command(Command::new(&hook)) {
126-
Err(err) if err.raw_os_error() == Some(8) => {
127+
Err(err) if err.raw_os_error() == Some(ENOEXEC) => {
127128
run_command(sh_command(&hook))
128129
}
129130
result => result,

0 commit comments

Comments
 (0)