mirro-rs icon indicating copy to clipboard operation
mirro-rs copied to clipboard

Add informative output in --help or --version where a config file is expected to be loaded

Open skyleo opened this issue 5 months ago • 1 comments

Is your feature request related to a problem? Please describe.

  • [x] I've tried to get mirro-rs to load my config file to no avail. I'm using version 0.2.3.
  • [x] I've checked the PCKGBLD file in the non-AUR package of Arch Linux to verify it expects toml.
  • [x] export returns XDG_CONFIG_HOME=/home/leo/.config as expected.
  • [x] I've tried starting via XDG_CONFIG_HOME=/home/leo/.config mirro-rs
  • [x] I've tried $XDG_CONFIG_HOME/mirro-rs/mirro-rs.toml as location
  • [x] I've tried $XDG_CONFIG_HOME/mirro-rs.toml as location

But not a single filter of my config seems to be loaded.

Describe the solution you'd like

In order to debug such a problem easier, I'd have loved to know where mirro-rs looksup my configuration file and/or if it failed to find one. (In case it did find one and there's a parsing issue)

Attachments

The used config file:

[general]
outfile = "~/mirrorlist" # must not end with trailing slash
# Max number of mirrors to export
export = 25
view = "alphabetical" # alphabetical mirror-count
sort = "score" # percentage, duration, delay, score
cache-ttl = 24
url = "https://archlinux.org/mirrors/status/json/"
rate-speed = true
timeout = 5
#include = [
#  "https://cloudflaremirrors.com/archlinux/"
#]

[filters]
countries = [ Japan, Germany ]
age = 24
ipv6 = true
ipv4 = true
isos = false
protocols = [ "https" ]
completion-percent = 100

skyleo avatar Sep 11 '24 02:09 skyleo