Thanks to visit codestin.com
Credit goes to github.com

Skip to content

use of getenv on display mode leads to error #422

@xdelaruelle

Description

@xdelaruelle

Some use case of the getenv modulefile command:

set _modules_home [getenv MODULESHOME]
source ${_modules_home}/common

Leads to error when displaying modulefile:

$ module display mod
-------------------------------------------------------------------
/path/to/mod:

Module ERROR: couldn't read file "$MODULESHOME/common": no such file or directory
       while executing
   "source  "${_modules_home}/common"
       (file "/path/to/mod" line 8)
   Please contact <root@localhost>
-------------------------------------------------------------------

On display mode, getenv returns the variable name which leads to such error as the value is expected to fully resolve string value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions