Skip to content

Poor output for commands with multiple errors #267

@nfischer

Description

@nfischer

The following code snippet demonstrates poor error message handling:

$ # assume that fake1, fake2, and fake3 do not exist
$ cat test.js
require('shelljs/global');
ls('fake1', 'fake2', 'fake3');

$ shjs test.js
ls: no such file or directory: fake1

ls: no such file or directory: fake1
ls: no such file or directory: fake2

ls: no such file or directory: fake1
ls: no such file or directory: fake2
ls: no such file or directory: fake3

As you can see, the error message is concatenated and re-printed each time. I think the cleaner behavior is to concatenate and only print when the command exits.

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