-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
34 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#!/usr/bin/env sh | ||
. "${0%/*}/h" | ||
. "$(dirname "$0")/h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#!/usr/bin/env sh | ||
. "${0%/*}/h" | ||
. "$(dirname "$0")/h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
#!/usr/bin/env sh | ||
H="$HUSKY" | ||
[ "$H" = "2" ] && set -x | ||
h="${0##*/}" | ||
s="${0%/*/*}/$h" | ||
[ "$HUSKY" = "2" ] && set -x | ||
n=$(basename "$0") | ||
s=$(dirname "$(dirname "$0")")/$n | ||
|
||
[ ! -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 | ||
if [ -f "$HOME/.huskyrc" ]; then | ||
echo "husky - '~/.huskyrc' is DEPRECATED, please move your code to ~/.config/husky/init.sh" | ||
fi | ||
i="${XDG_CONFIG_HOME:-$HOME/.config}/husky/init.sh" | ||
[ -f "$i" ] && . "$i" | ||
|
||
[ "$H" = "0" ] && exit 0 | ||
[ "${HUSKY-}" = "0" ] && exit 0 | ||
|
||
export PATH="node_modules/.bin:$PATH" | ||
sh -e "$s" "$@" | ||
c=$? | ||
|
||
[ $c != 0 ] && echo "husky - $h script failed (code $c)" | ||
[ $c != 0 ] && echo "husky - $n script failed (code $c)" | ||
[ $c = 127 ] && echo "husky - command not found in PATH=$PATH" | ||
exit $c | ||
exit $c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
echo "husky - DEPRECATED | ||
Please remove the following two lines from $0: | ||
#!/usr/bin/env sh | ||
. \"\$(dirname -- \"\$0\")/_/husky.sh\" | ||
They WILL FAIL in v10.0.0 | ||
" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#!/usr/bin/env sh | ||
. "${0%/*}/h" | ||
. "$(dirname "$0")/h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#!/usr/bin/env sh | ||
. "${0%/*}/h" | ||
. "$(dirname "$0")/h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#!/usr/bin/env sh | ||
. "${0%/*}/h" | ||
. "$(dirname "$0")/h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#!/usr/bin/env sh | ||
. "${0%/*}/h" | ||
. "$(dirname "$0")/h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#!/usr/bin/env sh | ||
. "${0%/*}/h" | ||
. "$(dirname "$0")/h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#!/usr/bin/env sh | ||
. "${0%/*}/h" | ||
. "$(dirname "$0")/h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#!/usr/bin/env sh | ||
. "${0%/*}/h" | ||
. "$(dirname "$0")/h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#!/usr/bin/env sh | ||
. "${0%/*}/h" | ||
. "$(dirname "$0")/h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#!/usr/bin/env sh | ||
. "${0%/*}/h" | ||
. "$(dirname "$0")/h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#!/usr/bin/env sh | ||
. "${0%/*}/h" | ||
. "$(dirname "$0")/h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#!/usr/bin/env sh | ||
. "${0%/*}/h" | ||
. "$(dirname "$0")/h" |