How to use country names with spaces in reflector-auto?

How can one use country names with spaces in reflector-auto?

Using an /etc/reflector-auto.conf file containing:

-c 'United States' -c Canada -c Poland -f 15 -p https -a 2

will not work and returns this error:

Reflector.py: error: unrecognized arguments: States'

But using US instead of 'United States' will work correctly.

-c US -c Canada -c Poland -f 15 -p https -a 2

Note that using 'United States' in the normal reflector command like the following does work.

sudo reflector --country 'United States' --country Canada --country Poland --age 2 --protocol https --sort rate --save /etc/pacman.d/mirrorlist
1 Like

Thanks for the report, I’ll check this as soon as possible.

That is indeed an issue for reflector-auto.
Until it is fixed, an alternative way (workaround) is to use country codes like US.

To see the supported country codes, look at the output of command:

    reflector --list-countries

Fixed in reflector-auto version 1.1.1-1.

2 Likes

Just tested reflector-auto version 1.1.1-1 and it works as it should. Thanks @manuel.

2 Likes