rse / slideshow

Slideshow -- Observe and Control Slideshow Applications
https://www.npmjs.org/package/slideshow
Mozilla Public License 2.0
85 stars 14 forks source link

slideshow powerpoint use & slideshow powerpoint help crash the CLI interface on Windows #9

Open antroseco opened 6 years ago

antroseco commented 6 years ago

"help" and "use" are valid commands so they are accepted as a second argument, however they API does not have functions defined for them, leading to this error.

slideshow powerpoint help
\npm\node_modules\slideshow\slideshow-cli.js:160
    ss[argv[1]](argv[2]).then(function (response) {
               ^

TypeError: ss[argv[1]] is not a function
    at cliBatch (\npm\node_modules\slideshow\slideshow-cli.js:160:16)
    at Object.<anonymous> (\npm\node_modules\slideshow\slideshow-cli.js:173:5)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
    at Function.Module.runMain (module.js:701:10)
    at startup (bootstrap_node.js:193:16)
    at bootstrap_node.js:617:3
rse commented 6 years ago

Well, yes, indeed. "help" and "use" are implemented just by the CLI locally and are not derived from the API. That's as intended. And they are just commands on the interactive CLI prompt. And there is no "slideshow powerpoint help", but just a "slideshow help".

antroseco commented 6 years ago

Ofcourse, the issue is not that the commands don't work but that the CLI doesn't fail gracefully. It doesn't do enough input sanitization basically.