Skip to content

Shelljs print stderr to console even if exec-only "silent" is true #905

@solominsn

Description

@solominsn

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

6.14.x, but it doesn't matter

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

0.8.2

Operating system:

Debian 10

Description of the bug:

Bug #887 has been closed, but it's a real bug. Exec-only "silent" option is not passed to helper function (common.error) which check error code and write stderr to console. Changing global config "silent" to false is only way to suppress stderr printing. If required fix can be prepared and pushed.

Example ShellJS command to reproduce the error:

shell.exec('npm run invalid-command', { silent: true });

Invalid command returns non-zero error code and shelljs print stderr to console.

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicatefixBug/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