diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9f0295d..e0f134d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -73,17 +73,6 @@ jobs: command: install args: --color=always --git=https://github.com/cross-rs/cross.git --locked --rev=02bf930e0cb0c6f1beffece0788f3932ecb2c7eb --verbose cross - - name: Test secret - env: - POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }} - run: | - if [ -n "$POSTHOG_API_KEY" ]; then - echo "Secret is set and not empty" - else - echo "Secret is not set or empty" - exit 1 - fi - - name: Build binary uses: actions-rs/cargo@v1 env: diff --git a/src/main.rs b/src/main.rs index 9762705..1451f1a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,10 +20,17 @@ pub async fn main() -> ExitCode { 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"); + } + let flag_file = get_config_path().unwrap().with_file_name(".vpm_welcome_shown"); if !flag_file.exists() { create_config().unwrap(); - + println!("Welcome to vpm!"); println!("We collect anonymous usage data to improve the tool."); println!("The following information will be collected:");