Skip to content

Commit 4461caf

Browse files
committed
Clear auto-loaded tag on cmdModuleTag
When the unset_extra flag is enabled, also remove the auto-loaded tag on module if it is not part of the target tag_list.
1 parent 41d9bf0 commit 4461caf

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tcl/subcmd.tcl.in

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2427,6 +2427,14 @@ proc cmdModuleTag {unset_extra tag_list args} {
24272427
}
24282428
}
24292429

2430+
# ensure auto-loaded tag is not preserved if not part of target tags
2431+
if {$unset_extra && {auto-loaded} ni $tag_list} {
2432+
unsetModuleTag $modname auto-loaded
2433+
if {$modnamevr ne {} && $modname ne $modnamevr} {
2434+
unsetModuleTag $modnamevr auto-loaded
2435+
}
2436+
}
2437+
24302438
# record new tags as extra tag excluding tags relative to the way
24312439
# module is loaded (auto, keep)
24322440
lassign [getDiffBetweenList $diff_list [list auto-loaded\

0 commit comments

Comments
 (0)