diff --git a/.framework-config b/.framework-config index 13906e84..75f39500 100755 --- a/.framework-config +++ b/.framework-config @@ -1,7 +1,7 @@ #!/usr/bin/env bash # shellcheck disable=SC2034 -BASH_TOOLS_ROOT_DIR="${BASH_TOOLS_ROOT_DIR:-$(cd "$(readlink -e "${BASH_SOURCE[0]%/*}")" && pwd -P)}" +BASH_TOOLS_ROOT_DIR="$(cd -- "$(dirname -- "${CURRENT_LOADED_ENV_FILE}")" &>/dev/null && pwd -P)" FRAMEWORK_ROOT_DIR="${FRAMEWORK_ROOT_DIR:-${BASH_TOOLS_ROOT_DIR}/vendor/bash-tools-framework}" FRAMEWORK_SRC_DIR="${FRAMEWORK_SRC_DIR:-${FRAMEWORK_ROOT_DIR}/src}" FRAMEWORK_BIN_DIR="${FRAMEWORK_BIN_DIR:-${FRAMEWORK_ROOT_DIR}/bin}" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8a876cd5..4379fbb0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -61,7 +61,7 @@ repos: - id: prettier - repo: https://github.com/fchastanet/bash-tools-framework - rev: 1.1.8 + rev: 2.0.0 hooks: - id: fixShebangExecutionBit - id: fixShebangExecutionBitGithubActions @@ -77,6 +77,8 @@ repos: plain, --theme, default-force, + --display-level, + WARNING, ] - id: frameworkLinterGithubAction args: @@ -87,6 +89,8 @@ repos: checkstyle, --theme, default-force, + --display-level, + WARNING, ] - id: plantuml - id: buildShFiles diff --git a/bin/cli b/bin/cli index 11e0c762..ecfad827 100755 --- a/bin/cli +++ b/bin/cli @@ -453,7 +453,7 @@ Env::requireLoad() { for file in "${configFiles[@]}"; do # shellcheck source=/.framework-config - source "${file}" || { + CURRENT_LOADED_ENV_FILE="${file}" source "${file}" || { Log::displayError "while loading config file: ${file}" return 1 } diff --git a/bin/dbImport b/bin/dbImport index 33acf693..c2fdb4fd 100755 --- a/bin/dbImport +++ b/bin/dbImport @@ -539,7 +539,7 @@ Env::requireLoad() { for file in "${configFiles[@]}"; do # shellcheck source=/.framework-config - source "${file}" || { + CURRENT_LOADED_ENV_FILE="${file}" source "${file}" || { Log::displayError "while loading config file: ${file}" return 1 } diff --git a/bin/dbImportProfile b/bin/dbImportProfile index 0d7b4c40..c5ac70d5 100755 --- a/bin/dbImportProfile +++ b/bin/dbImportProfile @@ -421,7 +421,7 @@ Env::requireLoad() { for file in "${configFiles[@]}"; do # shellcheck source=/.framework-config - source "${file}" || { + CURRENT_LOADED_ENV_FILE="${file}" source "${file}" || { Log::displayError "while loading config file: ${file}" return 1 } diff --git a/bin/dbImportStream b/bin/dbImportStream index 6d8fb926..a7c9b1d2 100755 --- a/bin/dbImportStream +++ b/bin/dbImportStream @@ -476,7 +476,7 @@ Env::requireLoad() { for file in "${configFiles[@]}"; do # shellcheck source=/.framework-config - source "${file}" || { + CURRENT_LOADED_ENV_FILE="${file}" source "${file}" || { Log::displayError "while loading config file: ${file}" return 1 } diff --git a/bin/dbQueryAllDatabases b/bin/dbQueryAllDatabases index 06ffbbe0..358666fa 100755 --- a/bin/dbQueryAllDatabases +++ b/bin/dbQueryAllDatabases @@ -467,7 +467,7 @@ Env::requireLoad() { for file in "${configFiles[@]}"; do # shellcheck source=/.framework-config - source "${file}" || { + CURRENT_LOADED_ENV_FILE="${file}" source "${file}" || { Log::displayError "while loading config file: ${file}" return 1 } @@ -1094,8 +1094,8 @@ Log::logSkipped() { # @require Compiler::Embed::requireEmbedBinDir -declare -gx embed_function_DbQueryOneDatabase="${PERSISTENT_TMPDIR:-/tmp}/bin/381679fc2529dfab4ed52310d74a2fe5/dbQueryOneDatabase" -declare -gx encoded_binary_file_DbQueryOneDatabase="IyEvdXNyL2Jpbi9lbnYgYmFzaAojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgR0VORVJBVEVEIEZBQ0FERSBGUk9NIGh0dHBz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IG1lc3NhZ2U6U3RyaW5nIHRoZSBtZXNzYWdlIHRvIGRpc3BsYXkKTG9nOjpsb2dTa2lwcGVkKCkgewogIGlmICgoQkFTSF9GUkFNRVdPUktfTE9HX0xFVkVMID49IF9fTEVWRUxfSU5GTykpOyB0aGVuCiAgICBMb2c6OmxvZ01lc3NhZ2UgIiR7MjotU0tJUFBFRH0iICIkMSIKICBmaQp9CgojIEZVTkNUSU9OUwoKZmFjYWRlX21haW5fZW1iZWRGcmFtZXdvcmtGdW5jdGlvbmJpbkZpbGV0cGwoKSB7CiMgUkVRVUlSRVMKTGludXg6OnJlcXVpcmVFeGVjdXRlZEFzVXNlcgpFbnY6OnJlcXVpcmVMb2FkCkxvZzo6cmVxdWlyZUxvYWQKTGludXg6OnJlcXVpcmVSZWFscGF0aENvbW1hbmQKVUk6OnJlcXVpcmVUaGVtZQpDb21waWxlcjo6RmFjYWRlOjpyZXF1aXJlQ29tbWFuZEJpbkRpcgoKIyBAcmVxdWlyZSBDb21waWxlcjo6RmFjYWRlOjpyZXF1aXJlQ29tbWFuZEJpbkRpcgoKIyBzaGVsbGNoZWNrIGRpc2FibGU9U0MyMTU0LFNDMjAxNgpmdW5jdGlvblRvQ2FsbD0nRGI6OnF1ZXJ5T25lRGF0YWJhc2UnCiIke2Z1bmN0aW9uVG9DYWxsfSIgIiRAIgoKfQoKZmFjYWRlX21haW5fZW1iZWRGcmFtZXdvcmtGdW5jdGlvbmJpbkZpbGV0cGwgIiRAIgo=" Compiler::Embed::extractFileFromBase64 \ "${embed_function_DbQueryOneDatabase}" \ diff --git a/bin/dbScriptAllDatabases b/bin/dbScriptAllDatabases index 26915d32..0ea90f86 100755 --- a/bin/dbScriptAllDatabases +++ b/bin/dbScriptAllDatabases @@ -467,7 +467,7 @@ Env::requireLoad() { for file in "${configFiles[@]}"; do # shellcheck source=/.framework-config - source "${file}" || { + CURRENT_LOADED_ENV_FILE="${file}" source "${file}" || { Log::displayError "while loading config file: ${file}" return 1 } @@ -1014,8 +1014,8 @@ Log::logSkipped() { # @require Compiler::Embed::requireEmbedBinDir -declare -gx embed_function_DbQueryOneDatabase="${PERSISTENT_TMPDIR:-/tmp}/bin/381679fc2529dfab4ed52310d74a2fe5/dbQueryOneDatabase" -declare -gx encoded_binary_file_DbQueryOneDatabase="IyEvdXNyL2Jpbi9lbnYgYmFzaAojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiMgR0VORVJBVEVEIEZBQ0FERSBGUk9NIGh0dHBzOi8vZ2l0aHViLmNvbS9mY2hhc3RhbmV0L2Jhc2gtdG9vbHMvdHJlZS9tYXN0ZXIvLi4vLi4vLmNhY2hlL3ByZS1jb21taXQvcmVwb3oyNmR2OV83L3NyYy9Db21waWxlci9FbWJlZC9lbWJlZEZyYW1ld29ya0Z1bmN0aW9uLmJpbkZpbGUudHBsCiMgRE8gTk9UIEVESVQgSVQKIyBAZ2VuZXJhdGVkCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMKIyBzaGVsbGNoZWNrIGRpc2FibGU9U0MyMjg4LFNDMjAzNAojIEJJTl9GSUxFPSR7QklOX0ZJTEV9CiMgRkFDQURFCgojIGVuc3VyZSB0aGF0IG5vIHVzZXIgYWxpYXNlcyBjb3VsZCBpbnRlcmZlcmUgd2l0aAojIGNvbW1hbmRzIHVzZWQgaW4gdGhpcyBzY3JpcHQKdW5hbGlhcyAtYSB8fCB0cnVlCnNob3B0IC11IGV4cGFuZF9hbGlhc2VzCgojIHNoZWxsY2hlY2sgZGlzYWJsZT1TQzIwMzQKKChmYWlsdXJlcyA9IDApKSB8fCB0cnVlCgojIEJhc2ggd2lsbCByZW1lbWJlciAmIHJldHVybiB0aGUgaGlnaGVzdCB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mFjYWRlX21haW5fZW1iZWRGcmFtZXdvcmtGdW5jdGlvbmJpbkZpbGV0cGwgIiRAIgo=" Compiler::Embed::extractFileFromBase64 \ "${embed_function_DbQueryOneDatabase}" \ diff --git a/bin/doc b/bin/doc index d965aed4..bfd43842 100755 --- a/bin/doc +++ b/bin/doc @@ -239,7 +239,7 @@ Env::requireLoad() { for file in "${configFiles[@]}"; do # shellcheck source=/.framework-config - source "${file}" || { + CURRENT_LOADED_ENV_FILE="${file}" source "${file}" || { Log::displayError "while loading config file: ${file}" return 1 } diff --git a/bin/gitIsAncestorOf b/bin/gitIsAncestorOf index 98f532ec..dcb86112 100755 --- a/bin/gitIsAncestorOf +++ b/bin/gitIsAncestorOf @@ -239,7 +239,7 @@ Env::requireLoad() { for file in "${configFiles[@]}"; do # shellcheck source=/.framework-config - source "${file}" || { + CURRENT_LOADED_ENV_FILE="${file}" source "${file}" || { Log::displayError "while loading config file: ${file}" return 1 } diff --git a/bin/gitIsBranch b/bin/gitIsBranch index 13ac130f..695f839c 100755 --- a/bin/gitIsBranch +++ b/bin/gitIsBranch @@ -239,7 +239,7 @@ Env::requireLoad() { for file in "${configFiles[@]}"; do # shellcheck source=/.framework-config - source "${file}" || { + CURRENT_LOADED_ENV_FILE="${file}" source "${file}" || { Log::displayError "while loading config file: ${file}" return 1 } diff --git a/bin/gitRenameBranch b/bin/gitRenameBranch index b17adeec..edae7127 100755 --- a/bin/gitRenameBranch +++ b/bin/gitRenameBranch @@ -255,7 +255,7 @@ Env::requireLoad() { for file in "${configFiles[@]}"; do # shellcheck source=/.framework-config - source "${file}" || { + CURRENT_LOADED_ENV_FILE="${file}" source "${file}" || { Log::displayError "while loading config file: ${file}" return 1 } diff --git a/bin/installRequirements b/bin/installRequirements index 2ab13892..6aaf59ca 100755 --- a/bin/installRequirements +++ b/bin/installRequirements @@ -239,7 +239,7 @@ Env::requireLoad() { for file in "${configFiles[@]}"; do # shellcheck source=/.framework-config - source "${file}" || { + CURRENT_LOADED_ENV_FILE="${file}" source "${file}" || { Log::displayError "while loading config file: ${file}" return 1 } diff --git a/bin/mysql2puml b/bin/mysql2puml index bb1517b9..8cf97a04 100755 --- a/bin/mysql2puml +++ b/bin/mysql2puml @@ -346,7 +346,7 @@ Env::requireLoad() { for file in "${configFiles[@]}"; do # shellcheck source=/.framework-config - source "${file}" || { + CURRENT_LOADED_ENV_FILE="${file}" source "${file}" || { Log::displayError "while loading config file: ${file}" return 1 } diff --git a/bin/upgradeGithubRelease b/bin/upgradeGithubRelease index 4f7e60e6..fab8b450 100755 --- a/bin/upgradeGithubRelease +++ b/bin/upgradeGithubRelease @@ -281,7 +281,7 @@ Env::requireLoad() { for file in "${configFiles[@]}"; do # shellcheck source=/.framework-config - source "${file}" || { + CURRENT_LOADED_ENV_FILE="${file}" source "${file}" || { Log::displayError "while loading config file: ${file}" return 1 } diff --git a/bin/waitForIt b/bin/waitForIt index 9d12da25..e18e9666 100755 --- a/bin/waitForIt +++ b/bin/waitForIt @@ -277,7 +277,7 @@ Env::requireLoad() { for file in "${configFiles[@]}"; do # shellcheck source=/.framework-config - source "${file}" || { + CURRENT_LOADED_ENV_FILE="${file}" source "${file}" || { Log::displayError "while loading config file: ${file}" return 1 } diff --git a/bin/waitForMysql b/bin/waitForMysql index 823a4d57..686d02c4 100755 --- a/bin/waitForMysql +++ b/bin/waitForMysql @@ -261,7 +261,7 @@ Env::requireLoad() { for file in "${configFiles[@]}"; do # shellcheck source=/.framework-config - source "${file}" || { + CURRENT_LOADED_ENV_FILE="${file}" source "${file}" || { Log::displayError "while loading config file: ${file}" return 1 } diff --git a/conf/dbScripts/extractData b/conf/dbScripts/extractData index 904a4489..2a801303 100755 --- a/conf/dbScripts/extractData +++ b/conf/dbScripts/extractData @@ -564,7 +564,7 @@ Env::requireLoad() { for file in "${configFiles[@]}"; do # shellcheck source=/.framework-config - source "${file}" || { + CURRENT_LOADED_ENV_FILE="${file}" source "${file}" || { Log::displayError "while loading config file: ${file}" return 1 } diff --git a/install b/install index 192c3023..3c177e36 100755 --- a/install +++ b/install @@ -239,7 +239,7 @@ Env::requireLoad() { for file in "${configFiles[@]}"; do # shellcheck source=/.framework-config - source "${file}" || { + CURRENT_LOADED_ENV_FILE="${file}" source "${file}" || { Log::displayError "while loading config file: ${file}" return 1 }