-
Notifications
You must be signed in to change notification settings - Fork 744
Poor output for commands with multiple errors #267
Copy link
Copy link
Closed
Labels
fixBug/defect, or a fix for such a problemBug/defect, or a fix for such a problem
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
fixBug/defect, or a fix for such a problemBug/defect, or a fix for such a problem