Skip to content

Support deep module alias with module name not related to an existing directory #168

@xdelaruelle

Description

@xdelaruelle
mkdir -p test/{bar,foo}
for i in test/bar/.modulerc test/bar/1 test/foo/1; do
echo '#%Module' >$i
done
echo 'module-alias bar/sub/2 foo/1' >>test/bar/.modulerc

module use ./test
module load bar/sub
ERROR: Unable to locate a modulefile for 'bar/sub'

Module alias is not found if sub parts of its name contains reference to a non-existent sub-directory, here sub in this example.

mkdir test/bar/sub
module load bar/sub
module list
Currently Loaded Modulefiles:
 1) foo/1

To implement this, some code should be added to GetModules procedure to create virtual directories based on alias names if there is no actual directory matching.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions