Skip to content

Commit 2f7c171

Browse files
committed
fix: use dotenvy instead of dotenv because dotenv is not get updates for a while
1 parent 656fcab commit 2f7c171

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

Cargo.lock

Lines changed: 1 addition & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ anyhow = "1.0"
1313
colored = "2.0"
1414
clap = { version = "4.3", features = ["derive"], optional = true }
1515
directories = { version = "5.0", optional = true }
16-
dotenv = { version = "0.15", optional = true }
16+
dotenvy = { version = "0.15", optional = true }
1717
reqwest = "0.11"
1818
json = "0.12"
1919
poise = "0.5"
@@ -57,6 +57,6 @@ default = ["cmd", "config_file", "database", "dotenv", "music", "spotify"]
5757
cmd = ["dep:clap", "dep:clap_complete"]
5858
config_file = ["dep:directories", "dep:taplo"]
5959
database = ["dep:directories", "dep:sqlx", "music"]
60-
dotenv = ["dep:dotenv"]
60+
dotenv = ["dep:dotenvy"]
6161
music = ["dep:songbird"]
6262
spotify = ["dep:serde", "music"]

src/config/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ impl Config {
136136

137137
log!(info, "Registering Configs");
138138
#[cfg(feature = "dotenv")]
139-
drop(dotenv::dotenv()); // It doesn't matter even if it fails
139+
dotenvy::dotenv().ok();
140140
#[cfg(feature = "config_file")]
141141
let config_file =
142142
taplo::parser::parse(fs::read_to_string(config_file_path)?.as_str()).into_dom();

0 commit comments

Comments
 (0)