From 16fcb79769b340122c53bf73f69c77011ac8f9a7 Mon Sep 17 00:00:00 2001 From: Noah Gorny Date: Fri, 29 Jan 2021 17:12:29 +0200 Subject: [PATCH] scripts: reloader: Improve shellcheck directives --- scripts/reloader.bash | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/reloader.bash b/scripts/reloader.bash index 8ecc3a6f..28ef8543 100644 --- a/scripts/reloader.bash +++ b/scripts/reloader.bash @@ -1,5 +1,4 @@ # shellcheck shell=bash -# shellcheck disable=SC1090,SC2221,SC2222,SC2145,SC2064 BASH_IT_LOG_PREFIX="core: reloader: " pushd "${BASH_IT}" > /dev/null || exit 1 @@ -24,12 +23,13 @@ _bash-it-load-sources() { _log_debug "Loading component..." output=$( set -e + # shellcheck disable=SC1090 (source "$current") 2>&1 ) retval=$? set +e - trap "_bash-it-load-sources ${scripts[@]}" EXIT + trap '_bash-it-load-sources ${scripts[@]}' EXIT if [[ $retval -gt 0 ]]; then _log_error 'Loading component failed...' if [[ -n "$output" ]]; then @@ -37,6 +37,7 @@ _bash-it-load-sources() { fi else _log_debug 'Loading component successful!' + # shellcheck disable=SC1090 source "$current" fi trap - EXIT @@ -51,6 +52,7 @@ _bash-it-load-sources() { if [[ "$1" != "skip" ]] && [[ -d "./enabled" ]]; then _bash_it_config_type="" + # shellcheck disable=SC2221,SC2222 case $1 in alias | completion | plugin) _bash_it_config_type=$1