Skip to content

Commit

Permalink
fix: stock exists when no store code or country code given
Browse files Browse the repository at this point in the history
  • Loading branch information
Ephigenia committed Aug 19, 2020
1 parent 700efaf commit d688952
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions source/cli-stock.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ program
stores = storesData.getStoresById(program.store);
} else if (program.store) {
stores = storesData.getStoresMatchingQuery(program.store, program.countryCode);
} else {
console.error('please provide country code and/or store id');
process.exit(1);
}

if (stores.length === 0) {
Expand Down

0 comments on commit d688952

Please sign in to comment.