Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update docs, allow comments in admin file with leading whitespace #737

Merged
merged 3 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion docs/source/140_deprecating_modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@ For example::

$ module load abc/1.2.3

-----------------------------------------------------------------
There are messages associated with the following module(s) :
-----------------------------------------------------------------
abc/1.2.3:
This module is deprecated and will be removed from the system
on June 19. Please load abc/2.3.4 instead.
-----------------------------------------------------------------


Note that this message is just text and in no way controls user access
Expand Down Expand Up @@ -64,6 +68,8 @@ full path to a modulefile. If it doesn't then it is a
moduleName/version string. Also, you can have several
modulefiles use the same message by separating them with *|*

You can add comments with the `#` character.

You can use Lua regular expression to also match one or modules for
both the full path to a module or the module fullname. Lua regular
expressions are much less powerful (see
Expand All @@ -87,7 +93,7 @@ names that have a '-' in their name requires % quoting.
The message can be as many lines as you like. The message ends with a
blank line. Below is an example::


# removed because ...
gcc/2.95: This module is deprecated and will be removed from the system on Jan 1. 1999.
Please switch to a newer compiler.

Expand Down
2 changes: 1 addition & 1 deletion src/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ function readAdmin()
repeat
v = v:gsub("%s+$","")

if (v:sub(1,1) == "#") then
if (v:gsub("^%s+", ""):sub(1,1) == "#") then
-- ignore this comment line
break

Expand Down
Loading