Skip to content

MODULEPATH broken across different shell invocations, due to poor package delivery for env. modules #5699

Description

@fgeorgatos

Dear GCP,

Here is an example of the bug manifestation.

Would you agree that the duplications and arbitrary ordering across different shell variants is a bug?

mkdir -p /tmp/hello; module use /tmp/hello ; for i in sh csh tcsh zsh ksh bash "bash -l"; do echo == SHELL is $i; echo 'echo $MODULEPATH'| $i ; done
== SHELL is sh
/tmp/hello:/etc/scl/modulefiles:/usr/share/Modules/modulefiles:/etc/modulefiles:/usr/share/modulefiles:/opt/apps/modulefiles
== SHELL is csh
/etc/scl/modulefiles:/tmp/hello:/etc/scl/modulefiles:/usr/share/Modules/modulefiles:/etc/modulefiles:/usr/share/modulefiles:/opt/apps/modulefiles
== SHELL is tcsh
/etc/scl/modulefiles:/tmp/hello:/etc/scl/modulefiles:/usr/share/Modules/modulefiles:/etc/modulefiles:/usr/share/modulefiles:/opt/apps/modulefiles
== SHELL is zsh
/tmp/hello:/etc/scl/modulefiles:/usr/share/Modules/modulefiles:/etc/modulefiles:/usr/share/modulefiles:/opt/apps/modulefiles
== SHELL is ksh
/tmp/hello:/etc/scl/modulefiles:/usr/share/Modules/modulefiles:/etc/modulefiles:/usr/share/modulefiles:/opt/apps/modulefiles
== SHELL is bash
/tmp/hello:/etc/scl/modulefiles:/usr/share/Modules/modulefiles:/etc/modulefiles:/usr/share/modulefiles:/opt/apps/modulefiles
== SHELL is bash -l
/etc/scl/modulefiles:/tmp/hello:/etc/scl/modulefiles:/usr/share/Modules/modulefiles:/etc/modulefiles:/usr/share/modulefiles:/opt/apps/modulefiles

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions