🩹 — Fix the order of config files test

This commit is contained in:
Luc Didry 2024-06-17 17:07:42 +02:00
parent 2380c9be7d
commit f848748999
No known key found for this signature in database
GPG key ID: EA868E12D0257E3C

View file

@ -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):