diff --git a/CHANGELOG.md b/CHANGELOG.md index a292f9d44..77ffecb20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## Unreleased +### Fixed + +- `phylum package` subcommand showing unprocessed packages as complete + ## 7.1.1 - 2024-10-09 ### Changed diff --git a/cli/src/commands/packages.rs b/cli/src/commands/packages.rs index 45302477d..50936fbe8 100644 --- a/cli/src/commands/packages.rs +++ b/cli/src/commands/packages.rs @@ -35,7 +35,7 @@ pub async fn handle_get_package(api: &PhylumApi, matches: &clap::ArgMatches) -> }; match resp { - PackageSubmitResponse::AlreadyProcessed(mut resp) => { + PackageSubmitResponse::AlreadyProcessed(mut resp) if resp.complete => { let filter = matches.get_one::("filter").and_then(|v| Filter::from_str(v).ok()); if let Some(filter) = filter { resp.filter(&filter); @@ -43,14 +43,14 @@ pub async fn handle_get_package(api: &PhylumApi, matches: &clap::ArgMatches) -> resp.write_stdout(pretty_print); }, - PackageSubmitResponse::AlreadySubmitted => { + PackageSubmitResponse::New => { print_user_warning!( - "Package is still processing. Please check back later for results." + "Thank you for submitting this package. Please check back later for results." ); }, - PackageSubmitResponse::New => { + _ => { print_user_warning!( - "Thank you for submitting this package. Please check back later for results." + "Package is still processing. Please check back later for results." ); }, }