diff --git a/environment_and_metadata.rst b/environment_and_metadata.rst index 3460803..b44fa4d 100644 --- a/environment_and_metadata.rst +++ b/environment_and_metadata.rst @@ -273,7 +273,7 @@ variables include special characters. ``--env-file`` option ===================== -The ``--env-file`` option lets you provide a file that contains +The ``--env-file`` option lets you provide multiple files that contain environment variables as ``NAME=VALUE`` pairs, e.g.: .. code:: @@ -281,9 +281,20 @@ environment variables as ``NAME=VALUE`` pairs, e.g.: $ cat myenvs MYVAR="Hello from a file" - $ {command} run --env-file myenvs env.sif + $ cat myenvs2 + MYVAR="Hello from a file 2" + + $ {command} run --env-file myenvs --env-file myenvs2 env.sif + Hello from a file 2 + + $ {command} run --env-file myenvs2,myenvs env.sif Hello from a file +.. note:: + + Note that environment variables presented in the ``--env-file`` file will + always overwrite the same variables defined in the former file. + ``{ENVPREFIX}ENV_`` prefix ==========================