Open DaLynxx opened 1 week ago
I think it's related to https://github.com/spf13/viper/issues/1784.
Adding viper.SetConfigType("yaml")
before reading the configuration file seems to fix this issue: https://github.com/yuzutech/kroki-cli/blob/d923cdd8336257d0f19f2993c112853859f68607/pkg/convert.go#L216
Feel free to submit a pull request.
Hello,
I might be missing somthing when using Kroki cli.
I'm trying to get Kroki-CLI to work while using it's --config option. (Windows 11, Kroki CLI version 0.5.0)
Using the environment variables it works fine to re-direct to my own kroki renderingserver. However, if i try to get it via a .yml file it always goes to render at demo.kroki.io (Validating via Wireshark).
One test for "failure" is to have a) evn variable KROKI_ENDPOINT set to a server that does not have kroki installed (for example localhost) i then get the expected fail mesage:
However, if I create a config.yml with
The kroki convert command (with
--config config.yml
) will happily generate me an svg using demo.kroki.io. It does not seem to be a "fallback to demo.kroki.io" because if the endpoint in the file is specified to the kroki server that I have locally it still directs the rendering to demo.kroki.io.What am I doing wrong?