mirror of
https://github.com/Pmodules/Pmodules.git
synced 2026-11-29 23:47:46 +01:00
modulecmd: bugfix in test whether a file is a modulefile or not
This commit is contained in:
1 parent
d3f6d400c4
commit
85cf207e9e
1 file changed
+2
-2
@@ -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}"
|
||||
|
||||
Reference in new issue
Block a user