Skip to content

Commit

Permalink
use dotenv (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
liam-nethermind authored Sep 26, 2024
1 parent ec003b7 commit 54b8649
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ indicatif = "0.17.7"
strum = "0.25.0"
strum_macros = "0.25.0"
dirs = "4.0"
dotenv = "0.15"

dyn-compiler = { path = "../dyn-compiler" }

Expand Down
3 changes: 3 additions & 0 deletions crates/cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use camino::Utf8PathBuf;
use console::{style, Emoji};
use dialoguer::{theme::ColorfulTheme, Input, Select};
use dirs::home_dir;
use dotenv::dotenv;
use indicatif::{HumanDuration, ProgressBar, ProgressStyle};
use std::{
env,
Expand All @@ -24,6 +25,8 @@ use validation::is_class_hash_valid;
use verify::VerifyProjectArgs;

fn main() -> anyhow::Result<()> {
dotenv().ok();

// TODO: make this cli use a secure api
// let api_key = match env::var("API_KEY") {
// Ok(api_key) => Some(api_key),
Expand Down

0 comments on commit 54b8649

Please sign in to comment.