mirror of
https://github.com/envmodules/modules.git
synced 2026-06-14 00:42:43 +08:00
Specific err on cmdModuleUse when empty dir name
This commit is contained in:
@@ -5828,6 +5828,9 @@ proc cmdModuleUse {args} {
|
||||
{-p} - {--prepend} - {-prepend} {
|
||||
set pos "prepend"
|
||||
}
|
||||
{} {
|
||||
reportError "Directory name empty"
|
||||
}
|
||||
default {
|
||||
# tranform given path in an absolute path to avoid
|
||||
# dependency to the current work directory.
|
||||
|
||||
@@ -30,7 +30,7 @@ regsub "^.*/$tsdirname" $path "$tsdirname" relpath
|
||||
set badpath "$modpath.bad"
|
||||
set mod_path "$path:$modpath"
|
||||
set bad_use "$error_msgs: Directory '$badpath' not found"
|
||||
set empty_use "$error_msgs: Directory '' not found"
|
||||
set empty_use "$error_msgs: Directory name empty"
|
||||
set loaded_path "$modpath"
|
||||
regsub "^.*/$tsdirname" $loaded_path "$tsdirname" loaded_relpath
|
||||
regsub "$tsdirname" $loaded_relpath "$tsdirname/../$tsdirname/./" loaded_relpath_wdot
|
||||
|
||||
@@ -136,7 +136,7 @@ lappend ans [list setpath LOADEDMODULES $module8]
|
||||
lappend ans [list setpath _LMFILES_ $modulefile8]
|
||||
lappend ans [list ERR]
|
||||
|
||||
set err_msg "$error_msgs: Directory '' not found"
|
||||
set err_msg "$error_msgs: Directory name empty"
|
||||
|
||||
testouterr_cmd_re "ALL" "load $module8" $ans "$err_msg"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user