Skip to content

Commit 20a6288

Browse files
authored
Replace dotenv with dotenvy (#107)
dotenv appears unmaintained and [does not support multiline values](dotenv-rs/dotenv#63) yet. Replace this with a the well maintained fork [dotenvy](https://crates.io/crates/dotenvy). ## Testing Ran `scope doctor run` locally and confirmed it successfully reads multi-line env vars correctly.
1 parent 9659e0b commit 20a6288

File tree

5 files changed

+11
-10
lines changed

5 files changed

+11
-10
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ lto = "thin"
3535
clap = { version = "4.5.4", features = ["derive", "env"]}
3636
human-panic = "1.2.3"
3737
tokio = { version = "1", features = ["full"] }
38-
dotenv = "0.15.0"
3938
colored = "2.1.0"
4039
which = { version = "6.0", features = ["regex"] }
4140
regex = "1.10.4"
@@ -78,3 +77,4 @@ octocrab = "0.38.0"
7877
jsonwebtoken = "9.3.0"
7978
secrecy = "0.8.0"
8079
url = "2.5.0"
80+
dotenvy = "0.15.7"

scope/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ name = "scope-intercept"
2929
clap.workspace = true
3030
human-panic.workspace = true
3131
tokio.workspace = true
32-
dotenv.workspace = true
3332
colored.workspace = true
3433
which.workspace = true
3534
regex.workspace = true
@@ -72,6 +71,7 @@ octocrab.workspace = true
7271
jsonwebtoken.workspace = true
7372
secrecy.workspace = true
7473
url.workspace = true
74+
dotenvy.workspace = true
7575

7676
[dev-dependencies]
7777
assert_cmd = "2.0.14"

scope/src/bin/scope-intercept.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ struct Cli {
3535
#[tokio::main]
3636
async fn main() -> anyhow::Result<()> {
3737
setup_panic!();
38-
dotenv::dotenv().ok();
38+
dotenvy::dotenv().ok();
3939
let exe_path = std::env::current_exe().unwrap();
4040
let env_path = exe_path.parent().unwrap().join("../etc/scope.env");
41-
dotenv::from_path(env_path).ok();
41+
dotenvy::from_path(env_path).ok();
4242
let opts = Cli::parse();
4343

4444
let (_guard, file_location) = opts

scope/src/bin/scope.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,11 @@ enum Command {
6161
#[tokio::main]
6262
async fn main() {
6363
setup_panic!();
64-
dotenv::dotenv().ok();
64+
dotenvy::dotenv().ok();
6565
let exe_path = std::env::current_exe().unwrap();
6666
let env_path = exe_path.parent().unwrap().join("../etc/scope.env");
67-
dotenv::from_path(env_path).ok();
67+
dotenvy::from_path(env_path).ok();
68+
dbg!(dotenvy::vars());
6869
let opts = Cli::parse();
6970

7071
let (_guard, file_location) = opts

0 commit comments

Comments
 (0)