Skip to content

export HUSKY=0 in a config has no effect #1393

Closed
@alecmev

Description

@alecmev

$HUSKY is evaluated before the configs are sourced, so its presence doesn't trigger exit 0:

husky/husky

Lines 2 to 14 in 095a4fe

H="$HUSKY"
[ "$H" = "2" ] && set -x
h="${0##*/}"
s="${0%/*/*}/$h"
[ ! -f "$s" ] && exit 0
for f in "${XDG_CONFIG_HOME:-$HOME/.config}/husky/init.sh" "$HOME/.huskyrc"; do
# shellcheck disable=SC1090
[ -f "$f" ] && . "$f"
done
[ "$H" = "0" ] && exit 0

Are the docs out-ot-date and I'm expected to put export H=0 in init.sh? Or something else is wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions