chawyehsu / hok

CLI reimplementation of Scoop in Rust
https://docs.rs/libscoop
Apache License 2.0
131 stars 5 forks source link

[BUG] `hok cat` regression #10

Open Kosette opened 1 month ago

Kosette commented 1 month ago

OS: Win11 Version: 0.1.0-beta5

hok cat <package> works before, now does not.

Error:

error: invalid value '' for '--style <components>': Unknown style, ''

For more information, try '--help'.
chawyehsu commented 1 month ago

Nothing was changed in the hok cat part in beta5. It seems you didn't set a value of the cat_style config but had bat installed. bat is used by hok cat when it's available and cat_style is read when bat is used.

To work around it, you may uninstall bat or set a valid cat_style value by using hok config set cat_style <value>.

Kosette commented 1 month ago

It seems you didn't set a value of the cat_style config but had bat installed. bat is used by hok cat when it's available and cat_style is read when bat is used.

That's the point. I found a related issue https://github.com/ScoopInstaller/Scoop/issues/4905: when scoop sets cat_style to a non-empty value, it uses bat, which I hadn't noticed before.

scoop config cat_style default makes a workaround.