File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -586,6 +586,12 @@ initialization or if the :mconfig:`silent_shell_debug` configuration option is
586586set to ``1 `` in the :file: `initrc ` configuration file. Option is set off by
587587default on Modules 5.
588588
589+ During the :subcmd: `autoinit ` process, the environment variable
590+ :envvar: `__MODULES_AUTOINIT_INPROGRESS ` is checked and if it is found set to
591+ ``1 ``, the initialization process immediately ends. If not, this environment
592+ variable is set to ``1 `` which ensures no initialization loop could occur,
593+ especially when the :mconfig: `set_shell_startup ` configuration option is set.
594+
589595Modulecmd startup
590596"""""""""""""""""
591597
@@ -779,7 +785,8 @@ The following environment variables appeared on Modules 5.
779785| in version | |
780786+============+=================================================================+
781787| 5.0 | :envvar: `MODULES_QUARANTINE_SUPPORT `, |
782- | | :envvar: `__MODULES_QUARANTINE_SET ` |
788+ | | :envvar: `__MODULES_QUARANTINE_SET `, |
789+ | | :envvar: `__MODULES_AUTOINIT_INPROGRESS ` |
783790+------------+-----------------------------------------------------------------+
784791
785792Modules Specific Tcl Commands
Original file line number Diff line number Diff line change @@ -1815,6 +1815,19 @@ Otherwise ``1`` is returned.
18151815ENVIRONMENT
18161816-----------
18171817
1818+ .. envvar :: __MODULES_AUTOINIT_INPROGRESS
1819+
1820+ If set to ``1 ``, the :subcmd: `autoinit ` sub-command process is skipped.
1821+
1822+ This environment variable is set to ``1 `` by the :subcmd: `autoinit `
1823+ sub-command after checking it is not set. It ensures no nested initialization
1824+ of Modules occur. At the end of the processing of the :subcmd: `autoinit `
1825+ sub-command, :envvar: `__MODULES_AUTOINIT_INPROGRESS ` is unset.
1826+
1827+ .. only :: html
1828+
1829+ .. versionadded :: 5.0
1830+
18181831.. envvar :: __MODULES_LMALTNAME
18191832
18201833 A colon separated list of the alternative names set through
You can’t perform that action at this time.
0 commit comments