From 6be8967b16ef22354fed20b63241f52e26dba25e Mon Sep 17 00:00:00 2001 From: Robert McLay Date: Thu, 16 Jan 2025 17:45:07 -0700 Subject: [PATCH] mode takes an array not a single value --- docs/source/370_irreversible.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/source/370_irreversible.rst b/docs/source/370_irreversible.rst index 182259a0a..de29e553e 100644 --- a/docs/source/370_irreversible.rst +++ b/docs/source/370_irreversible.rst @@ -17,14 +17,14 @@ Mode select is implemented through a table with a ``mode`` field that specifies setenv{ name = "MY_VAR", value = "some_value", - mode = "load" + mode = {"load"} } -- Execute only during unload setenv{ name = "CLEANUP_VAR", value = "cleanup_value", - mode = "unload" + mode = {"unload"} } Supported Modes @@ -40,8 +40,8 @@ Important Notes 1. When using mode select, the specified action becomes irreversible in the opposite mode. For example: - * If an action is specified with ``mode = "load"``, it will not be automatically reversed during unload - * If an action is specified with ``mode = "unload"``, it will not be automatically reversed during load + * If an action is specified with ``mode = {"load"}``, it will not be automatically reversed during unload + * If an action is specified with ``mode = {"unload"}``, it will not be automatically reversed during load 2. To completely remove the effects of a mode-specific module, you may need to: @@ -67,7 +67,7 @@ Consider a module that needs to perform special cleanup during unload:: setenv{ name = "CLEANUP_REQUIRED", value = "true", - mode = "unload" + mode = {"unload"} } In this example: @@ -83,4 +83,4 @@ Best Practices 2. Document any irreversible changes in the module's help text 3. Consider providing helper functions or instructions for users to manually reverse changes 4. Test both load and unload scenarios thoroughly -5. Consider the impact on module collections and module restore operations \ No newline at end of file +5. Consider the impact on module collections and module restore operations