You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ffc8179
Browse filesBrowse the repository at this point in the historyBrowse files
Resolve relative modulepath from cwd during modulefile evaluation
A relative path entry in MODULEPATH is made absolute by the procedure
which uses the directory of the modulefile being evaluated as base when
an evaluation is ongoing. A module loaded from within a modulefile, with
a "module load", "prereq" or "depends-on" command, is thus searched in a
wrong directory and reported as not found.
Relative modulepath entries refer to the current working directory of
the module command, whatever the evaluation context. Add an option to
the path resolution procedure to force this base directory and use it
when resolving modulepath entries.
The "is-used" modulefile command resolves its arguments relatively to
the modulefile directory, so a relative MODULEPATH entry passed as
argument does not match the entry once resolved from the current working
directory. The "unuse" sub-command compares its argument against the raw
MODULEPATH content, so a relative entry given in a non-normalized form,
like "./dir" or "dir/", is not recognized either.
Introduce a procedure that returns the MODULEPATH entry corresponding to
a given path, resolved as an absolute path from the modulefile directory
and from the current working directory, and use it in both "is-used" and
"unuse" to keep their matching logic aligned. Variable references in
MODULEPATH entries are still compared as-is by "unuse", which passes the
entry as registered to the path removal procedure.
Assisted-by: Claude:claude-fable-5-1
Signed-off-by: Xavier Delaruelle <xavier.delaruelle@cea.fr>
0 commit comments