mirror of
https://github.com/envmodules/modules.git
synced 2026-06-03 00:33:18 +08:00
Fix sym version targetting mod version with space in name
Correctly handle symbolic version target including a whitespace in their name.
This commit is contained in:
@@ -1764,7 +1764,7 @@ proc setModuleResolution {mod target {symver {}} {override_res_path 1}} {
|
||||
|
||||
# find end-point module and register step-by-step path to get to it
|
||||
set res $target
|
||||
set res_path $res
|
||||
lappend res_path $res
|
||||
while {$mod ne $res && [info exists g_resolvedPath($res)]} {
|
||||
set res $g_resolvedPath($res)
|
||||
lappend res_path $res
|
||||
|
||||
2
testsuite/modulefiles.path1/loc_dv10/.version
Normal file
2
testsuite/modulefiles.path1/loc_dv10/.version
Normal file
@@ -0,0 +1,2 @@
|
||||
#%Module
|
||||
set ModulesVersion {no default}
|
||||
1
testsuite/modulefiles.path1/loc_dv10/1.1
Normal file
1
testsuite/modulefiles.path1/loc_dv10/1.1
Normal file
@@ -0,0 +1 @@
|
||||
#%Module
|
||||
2
testsuite/modulefiles.path2/loc_dv10/.version
Normal file
2
testsuite/modulefiles.path2/loc_dv10/.version
Normal file
@@ -0,0 +1,2 @@
|
||||
#%Module
|
||||
set ModulesVersion {no default}
|
||||
1
testsuite/modulefiles.path2/loc_dv10/1.2
Normal file
1
testsuite/modulefiles.path2/loc_dv10/1.2
Normal file
@@ -0,0 +1 @@
|
||||
#%Module
|
||||
@@ -572,6 +572,15 @@ for {set i 42} {$i <= 49} {incr i} {
|
||||
cross_test_case $i
|
||||
}
|
||||
|
||||
|
||||
# test default symbol targetting a modulefile version with a whitespace in the name,
|
||||
# multiple versions of the module found in several modulepaths
|
||||
setenv_var MODULES_AVAIL_INDEPTH 1
|
||||
testouterr_cmd sh {avail -t loc_dv10} OK "$modpath1:\nloc_dv10/1.1\n\n$modpath2:\nloc_dv10/1.2"
|
||||
testouterr_cmd sh {load loc_dv10} ERR "$err_path'loc_dv10/no default'"
|
||||
unsetenv_var MODULES_AVAIL_INDEPTH
|
||||
|
||||
|
||||
#
|
||||
# Cleanup
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user