Skip to content

Commit

Permalink
Add processing when there are 0 search results
Browse files Browse the repository at this point in the history
  • Loading branch information
TakayasuKoura committed Aug 17, 2022
1 parent 9779455 commit e2cf3ae
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions libs/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,15 @@ export class SearchAction {
);
Deno.exit(1);
}

if (response.result.results.length === 0) {
console.error(
Colors.red("There were no results matching your keywords."),
Colors.red("Please change the keyword and search again."),
);
Deno.exit(1);
}

const catalogs = response.result.results;

let i = 1;
Expand Down

0 comments on commit e2cf3ae

Please sign in to comment.