Skip to content

Use of modulefile Tcl command within extra commands #590

Description

@xdelaruelle

When defining extra modulefile commands in siteconfig.tcl, if these commands rely on regular modulefile command, they should be executed into modulefile interpreter context to correctly behavior based on current evaluation mode.

proc module-addpath {path} {
    # get name of current module Tcl interp
    set itrp [getCurrentModfileInterpName]

    interp eval $itrp prepend-path MODULEPATH $path
}

The module(1) documentation should be updated to give such information.

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions