- Notifications
You must be signed in to change notification settings - Fork735
Closed
Description
It would be nice if shelljs gracefully handled file I/O errors due to permissions issues, as opposed to the current full error dump you get now:
var shelljs = require('./shelljs'); shelljs.mkdir('-p', '/var/log/myNewDir'); $ node shelljsConsumer.js shell.js: internal error Error: EACCES, permission denied '/var/log/myNewDir' at Object.fs.mkdirSync (fs.js:642:18) at mkdirSyncRecursive (shell.js:1649:8) at shell.js:541:7 at Array.forEach (native) at Object._mkdir (shell.js:526:8) at Object.mkdir (shell.js:1491:23) at Object.<anonymous> (shelljsConsumer.js:2:10) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32)
It seems like, for a lot of use cases (like this one), a more user-friendly error handling path could be initiated.