1 | #!/bin/bash
|
2 |
|
3 |
|
4 | BINARY="$NODEJS"
|
5 | export PATH="$NODEJSPATH":$PATH
|
6 | #
|
7 | # Add --dry-run cli flag support so we can execute this hook without side affects
|
8 | # and see if it works in the current environment
|
9 | #
|
10 | if [[ $* == *--dry-run* ]]; then
|
11 | if [[ -z "$BINARY" ]]; then
|
12 | exit 1
|
13 | fi
|
14 | else
|
15 | "$BINARY" "$("$BINARY" -e "console.log(require.resolve('$TASK'))")"
|
16 | fi
|