Skip to content

Commit 383179c

Browse files
committed
No warning on {preprend,append}-path --duplicates unload
Remove warning message when unloading a prepend-path or append-path modulefile command with --duplicates option set. Fixes #421
1 parent 14b5db4 commit 383179c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tcl/envmngt.tcl.in

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1405,7 +1405,10 @@ proc parsePathCommandArgs {cmd args} {
14051405
}
14061406
}
14071407
--duplicates {
1408-
if {$cmd eq {unload-path}} {
1408+
# raise warning when option is used by remove-path but not for
1409+
# append-path/prepend-path on unload mode
1410+
if {$cmd eq {unload-path} && ([lindex [info level -2] 0] ne\
1411+
{remove-path} || [getState mode] eq {load})} {
14091412
reportWarning "--duplicates option has no effect on $cmd"
14101413
} else {
14111414
set allow_dup 1

0 commit comments

Comments
 (0)