diff --git a/tcl/modspec.tcl b/tcl/modspec.tcl index d8efe08d..f02f8805 100644 --- a/tcl/modspec.tcl +++ b/tcl/modspec.tcl @@ -1490,6 +1490,12 @@ proc getModuleVersSpec {modarg} { } } +proc unsetModuleVersSpec {modarg} { + if {[info exists ::g_moduleVersSpec($modarg)]} { + unset ::g_moduleVersSpec($modarg) + } +} + # get module name from module name and version spec if parsed proc getModuleNameFromVersSpec {modarg} { if {[info exists ::g_moduleVersSpec($modarg)]} { diff --git a/tcl/subcmd.tcl.in b/tcl/subcmd.tcl.in index cf34fd53..1f0d9843 100644 --- a/tcl/subcmd.tcl.in +++ b/tcl/subcmd.tcl.in @@ -814,6 +814,9 @@ proc cmdModuleSource {mode args} { set modfile $absfpath set modname $absfpath set modnamevr $absfpath + # unset module specification not to confuse specific char in file + # path (like '+') with variant specification + unsetModuleVersSpec $mod set mod $absfpath # if not a path specification, try to resolve a modulefile } elseif {![isModuleFullPath $rawarg]} {