diff --git a/Cargo.lock b/Cargo.lock index 149a43a..d058e70 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -286,7 +286,7 @@ dependencies = [ [[package]] name = "genius-cli" -version = "0.1.0" +version = "0.1.1" dependencies = [ "clap", "colored_json", diff --git a/Cargo.toml b/Cargo.toml index 00b5c11..a46989f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "genius-cli" -version = "0.1.0" +version = "0.1.1" edition = "2021" description = "A command-line interface for Genius.com" readme = "README.md" diff --git a/src/main.rs b/src/main.rs index 063a45f..5d31abb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,4 @@ -use std::env; +use std::{env, process::exit}; use clap::{Arg, Command}; use colored_json::ToColoredJson; @@ -54,7 +54,8 @@ fn cli() -> Command<'static> { #[tokio::main] async fn main() { if env::var("GENIUS_TOKEN").unwrap().is_empty() { - panic!("Please set the GENIUS_TOKEN environment variable"); + println!("Please set the GENIUS_TOKEN environment variable"); + exit(1); } let genius = Genius::new(env::var("GENIUS_TOKEN").unwrap());