Skip to content

Commit

Permalink
feat: Exit early if package_manager is Unknown
Browse files Browse the repository at this point in the history
  • Loading branch information
Young-TW committed Sep 14, 2024
1 parent 69fc933 commit b8678ce
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ fn main() {
.get_matches();

let package_manager = env::detect_package_manager();
if package_manager == "Unknown" {
eprintln!("Unknown package manager");
return;
}

let command = matches.get_one::<String>("command").map(|s| s.as_str()).unwrap_or("upgrade");
let package = matches.get_one::<String>("package").unwrap_or(&"".to_string()).to_string();
Expand Down

0 comments on commit b8678ce

Please sign in to comment.