Skip to content

runtime error, if path not existing #220

Description

@jthDEV

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)```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions