mirror of
https://github.com/Pmodules/Pmodules.git
synced 2026-06-30 03:09:40 +02:00
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:
@@ -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