efugier / smartcat

Putting a brain behind `cat`🐈‍⬛ Integrating language models in the Unix commands ecosystem through text streams.
https://crates.io/crates/smartcat
Apache License 2.0
132 stars 9 forks source link

Fix $HOME being hardcoded at build time #11

Closed xlambein closed 6 months ago

xlambein commented 6 months ago

I've noticed that $HOME is hardcoded at build time when trying to determine the location of the smartcat config file. This is a problem if the user who built the binary is different from the one who's using it.

This is a small fix that basically replaces env! with std::env::var.