Skip to content

Commit

Permalink
Change installation to npm (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
fabasoad authored Nov 8, 2021
1 parent 586c4d2 commit 22f220c
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions hooks/_check-installation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,5 @@ set -eu

if ! command -v snyk &> /dev/null
then
echo "snyk is not installed"
if [ "$(uname -s)" = "Darwin" ]; then
os="macos"
elif [[ $(which apk) ]]; then
os="alpine"
elif [[ $(which apt) ]]; then
os="linux"
else
os="win"
fi

INSTALLATION_DIR="${HOME}"/bin
mkdir -p "${INSTALLATION_DIR}"
curl -s https://static.snyk.io/cli/latest/release.json | jq ".assets.\"snyk-${os}\".url" | xargs curl --output "${INSTALLATION_DIR}"/snyk
chmod +x "${INSTALLATION_DIR}"/snyk
export PATH="${INSTALLATION_DIR}/:$PATH"
npm install snyk@latest -g
fi

0 comments on commit 22f220c

Please sign in to comment.