mirror of
https://github.com/OMGeeky/twitch_data.git
synced 2025-12-26 16:27:24 +01:00
allow settings path to be set with env var TWBA_CONFIG
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "twba-twitch-data"
|
||||
version = "0.3.0"
|
||||
version = "0.3.1"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
@@ -704,6 +704,7 @@ pub async fn get_client<'a>() -> Result<TwitchClient<'a>> {
|
||||
.env()
|
||||
.file("./settings.toml")
|
||||
.file(shellexpand::tilde("~/twba/config.toml").into_owned())
|
||||
.file(std::env::var("TWBA_CONFIG").unwrap_or_else(|_| "~/twba/config.toml".to_string()))
|
||||
.load()
|
||||
.expect("Failed to load config");
|
||||
info!("get_client: config: {:?}", conf);
|
||||
|
||||
Reference in New Issue
Block a user