-
Notifications
You must be signed in to change notification settings - Fork 744
Closed
Description
Node version:
4.4.7
ShellJS version (the most recent version/Github branch you see the bug on):
0.7.0
Operating system:
Windows 10
Description of the bug:
I'm working on code that calls shelljs mkdir to create a directory. On Windows, the call to fs.mkdir() sometimes fails because of permission issues or whatever. This is a failure that I should be able to catch with a try/catch. But shelljs catches the error, outputs it to the console and exits the process (here). A utility like shelljs should never take such drastic action - it should be up to me the consumer to decide what to do with such an error.
Example ShellJS command to reproduce the error:
On windows:
var shelljs = require('shelljs');
shelljs.mkdir('c:\\Program Files\\foo');It should just throw in this situation so I can catch the error and decide what to do.
Metadata
Metadata
Assignees
Labels
No labels