diff --git a/src/lib/source.sh b/src/lib/source.sh index 8d96804..4e61598 100644 --- a/src/lib/source.sh +++ b/src/lib/source.sh @@ -37,7 +37,7 @@ validate_sources() { } validate_targets() { - # Check targets array and set __main_target variable. + # Check targets array and set __main_target and __main_target_path # # Usage: validate_targets ARRAY @@ -71,9 +71,9 @@ validate_targets() { # Fail if __main_target's path is not a directory parse_uri "$__main_target" if [ -d "$path" ]; then - __main_target="$path" + __main_target_path="$path" else - echo "Error: Path $path in $__main_target" \ + echo "Error: Path '$path' from URI '$__main_target'" \ "is not directory or does not exists" >&2 exit 1 fi @@ -120,4 +120,5 @@ is_function_set() { # Usage: is_function_set FUNCTION declare -F -- "$1" > /dev/null + return "$?" }