Skip to content

Passing empty string to cp throws internal error #664

@webOS101

Description

@webOS101

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

v6.8.0

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

0.7.6

Operating system:

Mac OS X

Description of the bug:

Passing empty string to cp command throws an internal error. Would be much easier to deal with an exception or error return.

ShellJS: internal error
Error: must provide pattern
    at new GlobSync (node_modules/glob/sync.js:31:11)
...
   at node_modules/shelljs/src/common.js:246:22

Example ShellJS command to reproduce the error:

shelljs.cp('', 'dest');

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