Skip to content

Commit 71f5755

Browse files
committed
doc: fix default value returned on getenv in man
Fix documentation of getenv modulefile command to describe that an empty string is now returned when designated environment variable is not defined and no default value to return is specified.
1 parent 4caa65b commit 71f5755

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

doc/source/modulefile.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ the *modulefile* is being loaded.
154154
.. mfcmd:: getenv variable [value]
155155

156156
Returns value of environment *variable*. If *variable* is not defined,
157-
*value* is returned if set, ``_UNDEFINED_`` is returned otherwise. The
157+
*value* is returned if set, an empty string is returned otherwise. The
158158
:mfcmd:`getenv` command should be preferred over the Tcl global variable
159159
``env`` to query environment variables.
160160

@@ -165,6 +165,10 @@ the *modulefile* is being loaded.
165165

166166
.. versionadded:: 4.0
167167

168+
.. versionchanged:: 5.0
169+
An empty string is returned instead of ``_UNDEFINED_`` when *variable*
170+
is not defined and no *value* is set
171+
168172
.. mfcmd:: getvariant variant [value]
169173

170174
Returns value of designated *variant*. If *variant* is not defined, *value*

0 commit comments

Comments
 (0)