Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
PKVadde committed Sep 12, 2024
1 parent 203509a commit 5b1d054
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ use crate::cmd::{Cmd, Execute};
use crate::error::SilentExit;
use crate::config_man::{get_config_path, create_config};

const POSTHOG_API_KEY: Option<&str> = option_env!("POSTHOG_API_KEY");

#[tokio::main]
pub async fn main() -> ExitCode {
// Forcibly disable backtraces.
env::remove_var("RUST_LIB_BACKTRACE");
env::remove_var("RUST_BACKTRACE");

let key = env::var("POSTHOG_API_KEY");
if key.is_err() {
println!("POSTHOG_API_KEY is not set");
} else {
println!("POSTHOG_API_KEY is set");
match POSTHOG_API_KEY {
Some(key) => println!("POSTHOG_API_KEY is set"),
None => eprintln!("Warning: POSTHOG_API_KEY is not set"),
}

let flag_file = get_config_path().unwrap().with_file_name(".vpm_welcome_shown");
Expand Down

0 comments on commit 5b1d054

Please sign in to comment.