From 00b17ca17ea0d9503aab3175732977a2119962b9 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 3 Nov 2022 18:18:46 -0700 Subject: use dotenv to pick up environment variables --- Cargo.lock | 8 ++++++++ adenosine-cli/Cargo.toml | 1 + adenosine-cli/src/bin/adenosine.rs | 1 + adenosine-pds/Cargo.toml | 1 + adenosine-pds/src/bin/adenosine-pds.rs | 1 + 5 files changed, 12 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index 1721692..f48b469 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -20,6 +20,7 @@ dependencies = [ "atty", "base64", "colored_json", + "dotenv", "env_logger 0.9.1", "lazy_static", "log", @@ -39,6 +40,7 @@ dependencies = [ "bcrypt", "bs58", "data-encoding", + "dotenv", "futures", "ipfs-sqlite-block-store", "iroh-car", @@ -1237,6 +1239,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" +[[package]] +name = "dotenv" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" + [[package]] name = "dtoa" version = "0.4.8" diff --git a/adenosine-cli/Cargo.toml b/adenosine-cli/Cargo.toml index 2d14447..9fa8fa7 100644 --- a/adenosine-cli/Cargo.toml +++ b/adenosine-cli/Cargo.toml @@ -22,6 +22,7 @@ serde_json = "*" base64 = "*" regex = "*" lazy_static = "*" +dotenv = "*" # uncertain about these... anyhow = "1.0" diff --git a/adenosine-cli/src/bin/adenosine.rs b/adenosine-cli/src/bin/adenosine.rs index 0b79cf9..931616b 100644 --- a/adenosine-cli/src/bin/adenosine.rs +++ b/adenosine-cli/src/bin/adenosine.rs @@ -208,6 +208,7 @@ enum Command { } fn main() -> Result<()> { + dotenv::dotenv().ok(); let opt = Opt::from_args(); let log_level = match opt.verbose { diff --git a/adenosine-pds/Cargo.toml b/adenosine-pds/Cargo.toml index 432e893..190ba00 100644 --- a/adenosine-pds/Cargo.toml +++ b/adenosine-pds/Cargo.toml @@ -40,6 +40,7 @@ ucan = "0.7.0-alpha.1" # TODO: replace this with data-encoding or similar; this is only needed for ucan_p256 stuff bs58 = "*" async-trait = "*" +dotenv = "*" [package.metadata.deb] maintainer = "Bryan Newbold " diff --git a/adenosine-pds/src/bin/adenosine-pds.rs b/adenosine-pds/src/bin/adenosine-pds.rs index cfae0ca..ce36587 100644 --- a/adenosine-pds/src/bin/adenosine-pds.rs +++ b/adenosine-pds/src/bin/adenosine-pds.rs @@ -61,6 +61,7 @@ enum Command { } fn main() -> Result<()> { + dotenv::dotenv().ok(); let opt = Opt::from_args(); let log_level = match opt.verbose { -- cgit v1.2.3