Skip to content

Commit

Permalink
Various tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
kevva committed Oct 4, 2014
1 parent 8318150 commit 14078cf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,17 @@ function get(args, options) {
var ret = [];

args.forEach(function (arg, i) {
if (arg.url.length === 0) {
if (!arg.url.length) {
console.error(logSymbols.warning, 'Specify a url');
process.exit(1);
}

if (arg.sizes.length === 0 && arg.keywords.length === 0) {
if (!arg.sizes.length && !arg.keywords.length) {
console.error(logSymbols.warning, 'Specify a size');
process.exit(1);
}

if (arg.keywords.length > 0) {
if (arg.keywords.length) {
arg.sizes = arg.sizes.concat(arg.keywords);
}

Expand Down Expand Up @@ -156,7 +156,7 @@ function init(args, options) {
return;
}

if (options.help || args.length === 0) {
if (options.help || !args.length) {
showHelp();
return;
}
Expand Down

0 comments on commit 14078cf

Please sign in to comment.