Permalink
Browse files

Fix error when no arguments are passed to downstagram

  • Loading branch information...
1 parent 7d3baae commit 62b28a5e6a569d5a6a1eb134ad52ff9c2fd39919 @rogeriopvl committed Jan 27, 2014
Showing with 5 additions and 0 deletions.
  1. +5 −0 bin/downstagram
View
@@ -22,6 +22,11 @@ if (!config.auth.access_token) {
var keepMetadata = false;
var first = args.shift();
+ if (!first) {
+ showHelp();
+ process.exit(0);
+ }
+
if (first.indexOf('-') === 0) {
if (first === '-v' || first === '--version') {
showVersion();

0 comments on commit 62b28a5

Please sign in to comment.