From d9782db4334b8d1f07f83aa12d6a234b2b68ded7 Mon Sep 17 00:00:00 2001 From: Robert Stoll Date: Sun, 28 Aug 2022 15:43:30 +0200 Subject: [PATCH] unset CDPATH --- scripts/before-pr.sh | 1 + scripts/check-in-bug-template.sh | 1 + scripts/prepare-next-dev-cycle.sh | 1 + scripts/release.sh | 1 + scripts/run-shellcheck.sh | 1 + scripts/update-docu.sh | 1 + src/qa/run-shellcheck.sh | 1 + src/releasing/prepare-files-next-dev-cycle.sh | 1 + src/releasing/release-files.sh | 1 + src/releasing/sneak-peek-banner.sh | 1 + src/releasing/toggle-sections.sh | 1 + src/releasing/update-version-README.sh | 1 + src/releasing/update-version-scripts.sh | 1 + src/utility/array-utils.sh | 1 + src/utility/ask.sh | 1 + src/utility/checks.sh | 3 ++- src/utility/git-utils.sh | 1 + src/utility/gpg-utils.sh | 1 + src/utility/io.sh | 1 + src/utility/log.sh | 1 + src/utility/parse-args.sh | 1 + src/utility/parse-commands.sh | 1 + src/utility/parse-fn-args.sh | 1 + src/utility/parse-utils.sh | 1 + src/utility/recursive-declare-p.sh | 1 + src/utility/replace-help-snippet.sh | 1 + src/utility/replace-snippet.sh | 1 + src/utility/source-once.sh | 1 + src/utility/update-bash-docu.sh | 1 + 29 files changed, 30 insertions(+), 1 deletion(-) diff --git a/scripts/before-pr.sh b/scripts/before-pr.sh index 7e42198a..d25f5aa6 100755 --- a/scripts/before-pr.sh +++ b/scripts/before-pr.sh @@ -10,6 +10,7 @@ ################################### set -euo pipefail shopt -s inherit_errexit +unset CDPATH if ! [[ -v scriptsDir ]]; then scriptsDir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)" diff --git a/scripts/check-in-bug-template.sh b/scripts/check-in-bug-template.sh index 0b794155..83620984 100755 --- a/scripts/check-in-bug-template.sh +++ b/scripts/check-in-bug-template.sh @@ -10,6 +10,7 @@ ################################### set -euo pipefail shopt -s inherit_errexit +unset CDPATH if ! [[ -v scriptsDir ]]; then scriptsDir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)" diff --git a/scripts/prepare-next-dev-cycle.sh b/scripts/prepare-next-dev-cycle.sh index 40c1ca8a..4f5622a1 100755 --- a/scripts/prepare-next-dev-cycle.sh +++ b/scripts/prepare-next-dev-cycle.sh @@ -10,6 +10,7 @@ ################################### set -euo pipefail shopt -s inherit_errexit +unset CDPATH if ! [[ -v scriptsDir ]]; then scriptsDir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)" diff --git a/scripts/release.sh b/scripts/release.sh index 3658dc54..a0b75d02 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -10,6 +10,7 @@ ################################### set -euo pipefail shopt -s inherit_errexit +unset CDPATH if ! [[ -v scriptsDir ]]; then scriptsDir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)" diff --git a/scripts/run-shellcheck.sh b/scripts/run-shellcheck.sh index 01d47728..f8ee6edb 100755 --- a/scripts/run-shellcheck.sh +++ b/scripts/run-shellcheck.sh @@ -10,6 +10,7 @@ ################################### set -euo pipefail shopt -s inherit_errexit +unset CDPATH if ! [[ -v scriptsDir ]]; then scriptsDir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)" diff --git a/scripts/update-docu.sh b/scripts/update-docu.sh index 9b6c1b67..f8ca3527 100755 --- a/scripts/update-docu.sh +++ b/scripts/update-docu.sh @@ -10,6 +10,7 @@ ################################### set -euo pipefail shopt -s inherit_errexit +unset CDPATH if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/../src" diff --git a/src/qa/run-shellcheck.sh b/src/qa/run-shellcheck.sh index 7bf41d71..c409d743 100755 --- a/src/qa/run-shellcheck.sh +++ b/src/qa/run-shellcheck.sh @@ -35,6 +35,7 @@ ################################### set -euo pipefail shopt -s inherit_errexit +unset CDPATH if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." diff --git a/src/releasing/prepare-files-next-dev-cycle.sh b/src/releasing/prepare-files-next-dev-cycle.sh index 085ea2f0..7e0d9dc8 100755 --- a/src/releasing/prepare-files-next-dev-cycle.sh +++ b/src/releasing/prepare-files-next-dev-cycle.sh @@ -49,6 +49,7 @@ ################################### set -euo pipefail shopt -s inherit_errexit +unset CDPATH export TEGONAL_SCRIPTS_VERSION='v0.14.0-SNAPSHOT' if ! [[ -v dir_of_tegonal_scripts ]]; then diff --git a/src/releasing/release-files.sh b/src/releasing/release-files.sh index ab3b146f..666c01b8 100755 --- a/src/releasing/release-files.sh +++ b/src/releasing/release-files.sh @@ -59,6 +59,7 @@ ################################### set -euo pipefail shopt -s inherit_errexit +unset CDPATH export TEGONAL_SCRIPTS_VERSION='v0.14.0-SNAPSHOT' if ! [[ -v dir_of_tegonal_scripts ]]; then diff --git a/src/releasing/sneak-peek-banner.sh b/src/releasing/sneak-peek-banner.sh index da069e3b..a739a278 100755 --- a/src/releasing/sneak-peek-banner.sh +++ b/src/releasing/sneak-peek-banner.sh @@ -31,6 +31,7 @@ ################################### set -euo pipefail shopt -s inherit_errexit +unset CDPATH export TEGONAL_SCRIPTS_VERSION='v0.14.0-SNAPSHOT' if ! [[ -v dir_of_tegonal_scripts ]]; then diff --git a/src/releasing/toggle-sections.sh b/src/releasing/toggle-sections.sh index 5ec1f0de..b8cf5165 100755 --- a/src/releasing/toggle-sections.sh +++ b/src/releasing/toggle-sections.sh @@ -35,6 +35,7 @@ ################################### set -euo pipefail shopt -s inherit_errexit +unset CDPATH export TEGONAL_SCRIPTS_VERSION='v0.14.0-SNAPSHOT' if ! [[ -v dir_of_tegonal_scripts ]]; then diff --git a/src/releasing/update-version-README.sh b/src/releasing/update-version-README.sh index d3352315..af07a6a5 100755 --- a/src/releasing/update-version-README.sh +++ b/src/releasing/update-version-README.sh @@ -31,6 +31,7 @@ ################################### set -euo pipefail shopt -s inherit_errexit +unset CDPATH export TEGONAL_SCRIPTS_VERSION='v0.14.0-SNAPSHOT' if ! [[ -v dir_of_tegonal_scripts ]]; then diff --git a/src/releasing/update-version-scripts.sh b/src/releasing/update-version-scripts.sh index f68a72df..9ad711e2 100755 --- a/src/releasing/update-version-scripts.sh +++ b/src/releasing/update-version-scripts.sh @@ -31,6 +31,7 @@ ################################### set -euo pipefail shopt -s inherit_errexit +unset CDPATH export TEGONAL_SCRIPTS_VERSION='v0.14.0-SNAPSHOT' if ! [[ -v dir_of_tegonal_scripts ]]; then diff --git a/src/utility/array-utils.sh b/src/utility/array-utils.sh index 26b4b5d2..89bd6265 100644 --- a/src/utility/array-utils.sh +++ b/src/utility/array-utils.sh @@ -54,6 +54,7 @@ ################################### set -euo pipefail shopt -s inherit_errexit +unset CDPATH if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." diff --git a/src/utility/ask.sh b/src/utility/ask.sh index dcc94dbc..4f872fd9 100644 --- a/src/utility/ask.sh +++ b/src/utility/ask.sh @@ -29,6 +29,7 @@ ################################### set -euo pipefail shopt -s inherit_errexit +unset CDPATH if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." diff --git a/src/utility/checks.sh b/src/utility/checks.sh index 10b35883..9fa30a04 100644 --- a/src/utility/checks.sh +++ b/src/utility/checks.sh @@ -61,6 +61,7 @@ ################################### set -euo pipefail shopt -s inherit_errexit +unset CDPATH if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." @@ -215,7 +216,7 @@ function checkCommandExists() { local file file=$(command -v "$name") || returnDying "%s is not installed (or not in PATH) %s" "$name" "${2:-""}" || return $? if ! [[ -x $file ]]; then - returnDying "%s is on the system at %s (according to command) but cannot be executed" "$name" "$file" || return $? + returnDying "%s is on the system at %s (according to command) but is not executable. Consider to execute:\nsudo chmod +x %s" "$name" "$file" "$file" || return $? fi } diff --git a/src/utility/git-utils.sh b/src/utility/git-utils.sh index 707eb9d2..78bc7b1c 100644 --- a/src/utility/git-utils.sh +++ b/src/utility/git-utils.sh @@ -51,6 +51,7 @@ ################################### set -euo pipefail shopt -s inherit_errexit +unset CDPATH if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." diff --git a/src/utility/gpg-utils.sh b/src/utility/gpg-utils.sh index 13a05a1e..adae42f6 100644 --- a/src/utility/gpg-utils.sh +++ b/src/utility/gpg-utils.sh @@ -37,6 +37,7 @@ ################################### set -euo pipefail shopt -s inherit_errexit +unset CDPATH if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." diff --git a/src/utility/io.sh b/src/utility/io.sh index 6b0efc2f..7c7b4eeb 100644 --- a/src/utility/io.sh +++ b/src/utility/io.sh @@ -42,6 +42,7 @@ ################################### set -euo pipefail shopt -s inherit_errexit +unset CDPATH if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." diff --git a/src/utility/log.sh b/src/utility/log.sh index fe43964b..3dfb6b37 100644 --- a/src/utility/log.sh +++ b/src/utility/log.sh @@ -84,6 +84,7 @@ ################################### set -euo pipefail shopt -s inherit_errexit +unset CDPATH function logInfo() { local msg=$1 diff --git a/src/utility/parse-args.sh b/src/utility/parse-args.sh index 3489bab1..e8879fee 100644 --- a/src/utility/parse-args.sh +++ b/src/utility/parse-args.sh @@ -69,6 +69,7 @@ ################################### set -euo pipefail shopt -s inherit_errexit +unset CDPATH if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." diff --git a/src/utility/parse-commands.sh b/src/utility/parse-commands.sh index 1daf0490..2c1d9410 100644 --- a/src/utility/parse-commands.sh +++ b/src/utility/parse-commands.sh @@ -59,6 +59,7 @@ ################################### set -euo pipefail shopt -s inherit_errexit +unset CDPATH if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." diff --git a/src/utility/parse-fn-args.sh b/src/utility/parse-fn-args.sh index 6358991f..d9ae33fc 100644 --- a/src/utility/parse-fn-args.sh +++ b/src/utility/parse-fn-args.sh @@ -56,6 +56,7 @@ ################################### set -euo pipefail shopt -s inherit_errexit +unset CDPATH if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." diff --git a/src/utility/parse-utils.sh b/src/utility/parse-utils.sh index 7064481f..67f3b990 100644 --- a/src/utility/parse-utils.sh +++ b/src/utility/parse-utils.sh @@ -48,6 +48,7 @@ ################################### set -euo pipefail shopt -s inherit_errexit +unset CDPATH if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." diff --git a/src/utility/recursive-declare-p.sh b/src/utility/recursive-declare-p.sh index 34fdd4c6..17aaae04 100644 --- a/src/utility/recursive-declare-p.sh +++ b/src/utility/recursive-declare-p.sh @@ -46,6 +46,7 @@ ################################### set -euo pipefail shopt -s inherit_errexit +unset CDPATH if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." diff --git a/src/utility/replace-help-snippet.sh b/src/utility/replace-help-snippet.sh index d93a9899..702efd53 100644 --- a/src/utility/replace-help-snippet.sh +++ b/src/utility/replace-help-snippet.sh @@ -45,6 +45,7 @@ ################################### set -euo pipefail shopt -s inherit_errexit +unset CDPATH if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." diff --git a/src/utility/replace-snippet.sh b/src/utility/replace-snippet.sh index 530c554e..2655ebff 100644 --- a/src/utility/replace-snippet.sh +++ b/src/utility/replace-snippet.sh @@ -49,6 +49,7 @@ ################################### set -euo pipefail shopt -s inherit_errexit +unset CDPATH if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." diff --git a/src/utility/source-once.sh b/src/utility/source-once.sh index 9efb3099..56c37df4 100644 --- a/src/utility/source-once.sh +++ b/src/utility/source-once.sh @@ -45,6 +45,7 @@ ################################### set -euo pipefail shopt -s inherit_errexit +unset CDPATH function determineSourceOnceGuard() { if ! (($# == 1)); then diff --git a/src/utility/update-bash-docu.sh b/src/utility/update-bash-docu.sh index 959e6f90..c8459308 100644 --- a/src/utility/update-bash-docu.sh +++ b/src/utility/update-bash-docu.sh @@ -41,6 +41,7 @@ ################################### set -euo pipefail shopt -s inherit_errexit +unset CDPATH if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.."