Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix case when nothing is passed to "-o" arg #262

Merged
merged 1 commit into from
May 24, 2016
Merged

Fix case when nothing is passed to "-o" arg #262

merged 1 commit into from
May 24, 2016

Conversation

bluurn
Copy link

@bluurn bluurn commented May 24, 2016

Fix case when nothing is passed to "-o" arg

Before

  • Input: aglio -i /path/to/api -o
  • Output:
/usr/local/lib/node_modules/aglio/lib/bin.js:228
      if (argv.c || argv.o.match(/\.apib$/ || argv.o.match(/\.md$/))) {
                           ^

TypeError: argv.o.match is not a function
    at Object.exports.run (/usr/local/lib/node_modules/aglio/lib/bin.js:228:28)
    at Object.<anonymous> (/usr/local/lib/node_modules/aglio/bin/aglio.js:5:23)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Function.Module.runMain (module.js:447:10)
    at startup (node.js:140:18)
    at node.js:1001:3

After

  • Input: aglio -i /path/to/api -o
  • Output:
>> [TypeError: Could not get template: Error loading cached resource: path must be a string]

@coveralls
Copy link

coveralls commented May 24, 2016

Coverage Status

Coverage remained the same at 92.473% when pulling ebff15f on bluurn:hotfix/empty-o-param-fix into 6cfe3fd on danielgtaylor:master.

@danielgtaylor
Copy link
Owner

@bluurn thanks! 👍

@danielgtaylor danielgtaylor merged commit 4ae89e6 into danielgtaylor:master May 24, 2016
@bluurn
Copy link
Author

bluurn commented May 24, 2016

@danielgtaylor 😉 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants