[envs] don't show enabled meson hooks as detected hooks
This commit is contained in:
parent
16ac82622d
commit
21d50e89f8
|
@ -115,8 +115,14 @@ odr-display-hooks() {
|
|||
git config --get-regexp odrhooks\. 2>/dev/null
|
||||
}
|
||||
|
||||
odr-add-detected-hooks() {
|
||||
for name in "${@}"; do
|
||||
[ "$(git config odrhooks.${name})" != 1 ] && DETECTED_HOOKS+=("${name}")
|
||||
done
|
||||
}
|
||||
|
||||
odr-detect-hooks() {
|
||||
[ -f "meson.build" ] && DETECTED_HOOKS+=(muon muonfmt)
|
||||
[ -f "meson.build" ] && odr-add-detected-hooks muon muonfmt
|
||||
}
|
||||
|
||||
odr_previous_dir=''
|
||||
|
|
|
@ -12,8 +12,7 @@
|
|||
local hooks=()
|
||||
|
||||
for hook in ${possible_hooks[@]}; do
|
||||
[ "$(git config odrhooks.$hook)" != 1 ] &&
|
||||
grep $hook pyproject.toml &>/dev/null && hooks+=($hook)
|
||||
grep $hook pyproject.toml &>/dev/null && odr-add-detected-hooks $hook
|
||||
done
|
||||
|
||||
DETECTED_HOOKS+="${hooks[@]}"
|
||||
|
|
Loading…
Reference in a new issue