This commit is contained in:
Marc Beninca 2024-11-25 16:31:59 +01:00
parent 62b8f60841
commit 678cf741c9
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -63,7 +63,10 @@ _sh_main_log() {
main_source_directory() { main_source_directory() {
local path="${1}" local path="${1}"
if [ -d "${path}" ]; then if [ ! -d "${path}" ]; then
_sh_main_log "Not a directory: ${path}"
return 1
fi
local cmd count ifs module modules local cmd count ifs module modules
modules="$(sh_source_find "${path}" "${SH_MAIN_NAME}")" modules="$(sh_source_find "${path}" "${SH_MAIN_NAME}")"
ifs="${IFS}" ifs="${IFS}"
@ -86,10 +89,6 @@ main_source_directory() {
fi fi
done done
IFS="${ifs}" IFS="${ifs}"
else
_sh_main_log "Not a directory: ${path}"
return 1
fi
} }
main_source_file() { main_source_file() {