From f84874899957af5fd021dbee5be9e49946371ebb Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Mon, 17 Jun 2024 17:07:42 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20=E2=80=94=20Fix=20the=20order=20?= =?UTF-8?q?of=20config=20files=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- argos/commands.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/argos/commands.py b/argos/commands.py index 746885b..e9b0f34 100644 --- a/argos/commands.py +++ b/argos/commands.py @@ -34,7 +34,9 @@ def coroutine(f): def validate_config_access(ctx, param, value): - for file in set(value, "argos-config.yaml", "/etc/argos/config.yaml"): + for file in list( + dict.fromkeys([value, "argos-config.yaml", "/etc/argos/config.yaml"]) + ): path = Path(file) if path.is_file() and os.access(path, os.R_OK):