Merge branch '319-modulecmd-bugfix-in-test-whether-a-file-is-a-modulefile-or-not' into 'master'

Resolve "modulecmd: bugfix in test whether a file is a modulefile or not"

Closes #319

See merge request Pmodules/src!298
This commit is contained in:
2024-08-13 16:33:06 +02:00
+2 -2
View File
@@ -470,8 +470,8 @@ is_modulefile() {
local -n im_interp="$1"
local -r fname="$2"
# does file exist and is readable?
[[ -r ${fname} ]] || return 2
# is this a regular, readable file?
[[ -f "${fname}" && -r "${fname}"]] || return 2
if [[ "${fname##*.}" == 'lua' ]]; then
im_interp="${Lmod_cmd}"