diff --git a/NEWS.rst b/NEWS.rst index bd690859..4edca7fb 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -140,6 +140,9 @@ Modules 4.6.0 (not yet released) :mfcmd:`module-forbid` modulefile commands to ignore hiding or forbidding definition respectively after and before a specified date time. Accepted date time format is ``YYYY-MM-DD[THH:MM]``. +* Add ``--message`` option to :mfcmd:`module-forbid` modulefile command to + supplement the error message obtained when trying to evaluate a forbidden + module. .. _GNU configuration recommendations: https://www.gnu.org/prep/standards/html_node/Configuration.html diff --git a/doc/source/modulefile.rst b/doc/source/modulefile.rst index e4f26104..4ed28c1b 100644 --- a/doc/source/modulefile.rst +++ b/doc/source/modulefile.rst @@ -240,7 +240,7 @@ the *modulefile* is being loaded. * another *modulefile* alias -.. mfcmd:: module-forbid [--after datetime] [--before datetime] [--not-user {user...}] [--not-group {group...}] modulefile... +.. mfcmd:: module-forbid [--after datetime] [--before datetime] [--not-user {user...}] [--not-group {group...}] [--message {text message}] modulefile... Forbid use of *modulefile*. An error is obtained when trying to evaluate a forbidden module. This command should be placed in one of the @@ -260,6 +260,9 @@ the *modulefile* is being loaded. specified. When both options are set, forbidding is not applied if a match is found for ``--not-user`` or ``--not-group``. + Error message returned when trying to evaluate a forbidden module can be + supplemented with the *text message* set through ``--message`` option. + If a :mfcmd:`module-forbid` command applies to a *modulefile* also targeted by a :mfcmd:`module-hide --hard` command, this module is unveiled when precisely named to return an access error.