-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump pre-commit/pre-commit-hooks from 4.5.0 to 4.6.0 (#45)
### Description - Bump pre-commit/pre-commit-hooks from 4.5.0 to 4.6.0 - Transform some scripts from bash to sh
- Loading branch information
Showing
9 changed files
with
94 additions
and
48 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
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
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
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,18 +1,20 @@ | ||
#!/usr/bin/env bash | ||
#!/usr/bin/env sh | ||
# shellcheck disable=SC2039,SC3020 | ||
set -eu | ||
|
||
if ! command -v snyk &> /dev/null | ||
then | ||
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)" | ||
SCRIPT_PATH=$(realpath "$0") | ||
INSTALLATION_FOLDER_PATH=$(dirname "${SCRIPT_PATH}") | ||
|
||
if ! command -v snyk &> /dev/null; then | ||
if command -v brew &> /dev/null; then | ||
bash "${SCRIPT_DIR}"/install-brew.sh | ||
sh "${INSTALLATION_FOLDER_PATH}/install-brew.sh" | ||
elif command -v scoop &> /dev/null; then | ||
bash "${SCRIPT_DIR}"/install-scoop.sh | ||
sh "${INSTALLATION_FOLDER_PATH}/install-scoop.sh" | ||
elif command -v npm &> /dev/null; then | ||
bash "${SCRIPT_DIR}"/install-npm.sh | ||
sh "${INSTALLATION_FOLDER_PATH}/install-npm.sh" | ||
elif command -v yarn &> /dev/null; then | ||
bash "${SCRIPT_DIR}"/install-yarn.sh | ||
sh "${INSTALLATION_FOLDER_PATH}/install-yarn.sh" | ||
else | ||
bash "${SCRIPT_DIR}"/install-standalone.sh | ||
sh "${INSTALLATION_FOLDER_PATH}/install-standalone.sh" | ||
fi | ||
fi |
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,6 +1,10 @@ | ||
#!/usr/bin/env bash | ||
#!/usr/bin/env sh | ||
set -eu | ||
SCRIPT_DIR="$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)" | ||
bash "${SCRIPT_DIR}"/installation/main.sh | ||
|
||
SCRIPT_PATH=$(realpath "$0") | ||
HOOKS_FOLDER_PATH=$(dirname "${SCRIPT_PATH}") | ||
INSTALLATION_FOLDER_PATH="${HOOKS_FOLDER_PATH}/installation" | ||
|
||
sh "${INSTALLATION_FOLDER_PATH}/main.sh" | ||
|
||
snyk code test "$@" |
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
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,6 +1,10 @@ | ||
#!/usr/bin/env bash | ||
#!/usr/bin/env sh | ||
set -eu | ||
SCRIPT_DIR="$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)" | ||
bash "${SCRIPT_DIR}"/installation/main.sh | ||
|
||
SCRIPT_PATH=$(realpath "$0") | ||
HOOKS_FOLDER_PATH=$(dirname "${SCRIPT_PATH}") | ||
INSTALLATION_FOLDER_PATH="${HOOKS_FOLDER_PATH}/installation" | ||
|
||
sh "${INSTALLATION_FOLDER_PATH}/main.sh" | ||
|
||
snyk iac test "$@" |
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,6 +1,10 @@ | ||
#!/usr/bin/env bash | ||
#!/usr/bin/env sh | ||
set -eu | ||
SCRIPT_DIR="$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)" | ||
bash "${SCRIPT_DIR}"/installation/main.sh | ||
|
||
SCRIPT_PATH=$(realpath "$0") | ||
HOOKS_FOLDER_PATH=$(dirname "${SCRIPT_PATH}") | ||
INSTALLATION_FOLDER_PATH="${HOOKS_FOLDER_PATH}/installation" | ||
|
||
sh "${INSTALLATION_FOLDER_PATH}/main.sh" | ||
|
||
snyk log4shell "$@" |
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,6 +1,10 @@ | ||
#!/usr/bin/env bash | ||
#!/usr/bin/env sh | ||
set -eu | ||
SCRIPT_DIR="$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)" | ||
bash "${SCRIPT_DIR}"/installation/main.sh | ||
|
||
SCRIPT_PATH=$(realpath "$0") | ||
HOOKS_FOLDER_PATH=$(dirname "${SCRIPT_PATH}") | ||
INSTALLATION_FOLDER_PATH="${HOOKS_FOLDER_PATH}/installation" | ||
|
||
sh "${INSTALLATION_FOLDER_PATH}/main.sh" | ||
|
||
snyk test "$@" |
9b618ed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Frontend developer here, so I don't have the details but one of the projects I work on uses this pre-commit, and I think this commit is causing issues. Sorry I can't be more helpful in recreatring.
9b618ed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically it checks if
snyk
is installed.. if no then it tries to install it viabrew
and ifbrew
doesn't exist then it fails.snyk
is installed on that machine?brew
is installed on that machine?