danielgtaylor / aglio

An API Blueprint renderer with theme support that outputs static HTML
4.75k stars 481 forks source link

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

Closed bluurn closed 8 years ago

bluurn commented 8 years ago

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

Before

/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

>> [TypeError: Could not get template: Error loading cached resource: path must be a string]
coveralls commented 8 years ago

Coverage Status

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

danielgtaylor commented 8 years ago

@bluurn thanks! :+1:

bluurn commented 8 years ago

@danielgtaylor 😉 👍