From b43c77dfb77d13ccf8990835cdfaf7a1291864cf Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Tue, 7 May 2024 16:34:59 +0200 Subject: [PATCH] Document loading configuration from env variables --- doc/conf.py | 5 +++++ osc/conf.py | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 0c6c777f9d..47d18d7b20 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -71,6 +71,11 @@ description=textwrap.dedent( """ The configuration file path is ``$XDG_CONFIG_HOME/osc/oscrc``, which usually translates into ``~/.config/osc/oscrc``. + + The configuration options are loaded with the following priority: + 1. environment variables: ``OSC_`` or ``OSC__`` + 2. command-line options + 3. oscrc config file """ ), sections={ diff --git a/osc/conf.py b/osc/conf.py index d53867e69b..51fc3876eb 100644 --- a/osc/conf.py +++ b/osc/conf.py @@ -1817,8 +1817,8 @@ def get_config(override_conffile=None, Configure osc. The configuration options are loaded with the following priority: - 1. environment variables: OSC_ - 2. override arguments provided to get_config() + 1. environment variables: ``OSC_`` or ``OSC__`` + 2. override arguments provided to ``get_config()`` 3. oscrc config file """