es-analysis / plato

JavaScript source code visualization, static analysis, and complexity tool

Repository from Github https://github.comes-analysis/platoRepository from Github https://github.comes-analysis/plato

runtime error, if path not existing

jthDEV opened this issue · comments

commented

error handling might be added for the case of a misspelled or not existing starting point (directory) is given. Plato currently replies with:

/usr/local/lib/node_modules/plato/lib/util.js:15
  var lastSlash = files[0].lastIndexOf(path.sep);
                          ^

TypeError: Cannot read property 'lastIndexOf' of undefined
    at Object.exports.findCommonBase (/usr/local/lib/node_modules/plato/lib/util.js:15:27)
    at Object.exports.inspect (/usr/local/lib/node_modules/plato/lib/plato.js:87:29)
    at Object.exports.exec (/usr/local/lib/node_modules/plato/lib/cli.js:53:9)
    at Object.<anonymous> (/usr/local/lib/node_modules/plato/bin/plato:19:5)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)```

duplicated issue with #133, #205
This project is no longer maintained, so I submitted a PR(#218) but it wasn't merged