artemsen / swayimg

Image viewer for Wayland
MIT License
380 stars 31 forks source link

Config overrides on CLI generate error messages #189

Closed bvergnaud closed 2 months ago

bvergnaud commented 2 months ago

Hello 👋🏻

On master (1d96fea8912b880df248c361a54c671f99220522), applying a config override via the CLI flag systematically generates an error message.

For example:

$ cat ~/.config/swayimg/config
...
[viewer]
scale = fit
...

$ swayimg --config="viewer.scale=fill"
WARNING: Unknown config parameter "scale = fit" in section "viewer"

I have tried several config options in different sections, same behaviour. The override value is used correctly, and if I don't override on the CLI there's no error message and the value from my config file is used. Testing with viewer.scale shows that very clearly.

I haven't bisected, but given the commits between the last release and master, I'd be really surprised if it wasn't related to 2f4006dc3ddf3e33e29ff5668c2ded0384fd6259.

artemsen commented 2 months ago

Fixed. Thank you for the bug report!