Skip to content

ShellJS: internal error on shelljs.mkdir('myFile/myDir') #720

@maikokuppe

Description

@maikokuppe

Node version (or tell us if you're using electron or some other framework):

6.9.2

ShellJS version (the most recent version/Github branch you see the bug on):

0.7.7

Operating system:

Ubuntu 16.04

Description of the bug:

ShellJS throws the following error when calling shelljs.mkdir('myFile/myDir') with an existing file myFile:

ShellJS: internal error
Error: ENOTDIR: not a directory, mkdir 'myFile/myDir'

This cannot be caught by try...catch, but should be.
Inspired by #473

Example ShellJS command to reproduce the error:

var shelljs = require('shelljs');
shelljs.touch('myFile');
shelljs.mkdir('myFile/myDir');

Metadata

Metadata

Assignees

Labels

fixBug/defect, or a fix for such a problem

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions