diff --git a/package.json b/package.json index 15add93..234f668 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "test-dev": "jest --runInBand --watch", "start": "webpack --watch --display errors-only", "lint": "eslint 'src/**' --ext .js", - "preinstall": "./scripts/create-key.sh", + "preinstall": "bash ./scripts/create-key.sh", "prebuild-dist": "npm run lint && npm run test", "build-dist": "npm run build", "predeploy": "npm run build-dist", @@ -22,7 +22,7 @@ "format:fix": "npm run format:base -- --write", "format:check": "npm run format:base -- --check", "release": "standard-version", - "deploy": "./scripts/deploy.sh", + "deploy": "bash ./scripts/deploy.sh", "coverage": "jest --runInBand --coverage", "snyk-protect": "snyk protect", "prepare": "npm run snyk-protect" diff --git a/scripts/create-key.sh b/scripts/create-key.sh index bf74432..d8c07e8 100755 --- a/scripts/create-key.sh +++ b/scripts/create-key.sh @@ -1,4 +1,8 @@ -#!/bin/bash -eu +#!/bin/bash + +set -e +set -u + SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")"; pwd)" # Figure out where the script is running . "$SCRIPT_DIR"/lib-robust-bash.sh # load the robust bash library PROJECT_ROOT="$SCRIPT_DIR"/.. # Figure out where the project directory is diff --git a/scripts/lib-robust-bash.sh b/scripts/lib-robust-bash.sh index cb0ec8e..7a1358d 100644 --- a/scripts/lib-robust-bash.sh +++ b/scripts/lib-robust-bash.sh @@ -1,4 +1,7 @@ -#!/bin/bash -eu +#!/bin/bash + +set -e +set -u # Check to see that we have a required binary on the path function require_binary {