Skip to content

purge sub-cmd unloads the dependencies of modules that cannot be unloaded #370

@xdelaruelle

Description

@xdelaruelle

Some modules may break their evaluation on unload mode to ensure they cannot be unloaded by users.

$ cat /path/to/modulefiles/foo/1.0 
#%Module
prereq bar

if {[module-info mode unload]} {
    break
}

However when using module purge, the dependencies of these non-unloadable modules are unloaded, which makes the resulting environment inconsistent.

$ ml
Currently Loaded Modulefiles:
 1) bar/1.0   2) foo/1.0  
$ ml purge
Unloading foo/1.0
  ERROR: Module evaluation aborted
$ ml
Currently Loaded Modulefiles:
 1) foo/1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions