Skip to content

Commit

Permalink
Fix unprocessed packages showing as complete (#1517)
Browse files Browse the repository at this point in the history
Closes #1516.
  • Loading branch information
cd-work authored Oct 10, 2024
1 parent 8a308ae commit dfd89eb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions cli/src/commands/packages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,22 @@ 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::<String>("filter").and_then(|v| Filter::from_str(v).ok());
if let Some(filter) = filter {
resp.filter(&filter);
}

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."
);
},
}
Expand Down

0 comments on commit dfd89eb

Please sign in to comment.