Skip to content

Commit 26ef861

Browse files
committed
Refactor use of --tag option within module load
1 parent 07be6b1 commit 26ef861

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

tcl/main.tcl.in

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -537,20 +537,12 @@ proc module {command args} {
537537
# register modulefiles to load as individual prereqs or all at
538538
# once for load-any sub-command
539539
if {$command eq {load-any}} {
540-
if {[llength $tag_list] > 0} {
541-
prereq --tag [join $tag_list :] {*}$args
542-
} else {
543-
prereq {*}$args
544-
}
540+
prereq --tag [join $tag_list :] {*}$args
545541
} else {
546542
foreach arg $args {
547543
# no prereq record if try-load did not succeed
548544
if {$command ne {try-load} || [is-loaded $arg]} {
549-
if {[llength $tag_list] > 0} {
550-
prereq --tag [join $tag_list :] $arg
551-
} else {
552-
prereq $arg
553-
}
545+
prereq --tag [join $tag_list :] $arg
554546
}
555547
}
556548
}

0 commit comments

Comments
 (0)