Skip to content

ProcessTermError instance isn't an instance of ProcessTermError #5451

@alecmev

Description

@alecmev

Do you want to request a feature or report a bug?

This is a bug.

What is the current behavior?

Running yarn -s run false with the following package.json:

{ "scripts": { "false": "false" } }

Results in the following output:

error An unexpected error occurred: "Command failed.
Exit code: 1
Command: sh
Arguments: -c false
Directory: /my/cwd
Output:
".

What is the expected behavior?

The expected output:

error Command failed with exit code 1.

Please mention your node.js, yarn and operating system version.

Node.js: 9.7.1
Yarn: 1.5.1
OS: Linux 4.15.6

Extra info.

I'm using --silent for brevity. I've inspected the compiled sources, inserted some logs around this catch, and narrowed it down to this fact:

new ProcessTermError('whatever') instanceof ProcessTermError === false

Appears to be some sort of an issue with Babel/Webpack configuration, and I'm assuming that other uses of instanceof are affected by this too.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions