Skip to content

yarn exits with 0 when running on a non-supported Node version #5258

@tdmalone

Description

@tdmalone

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

What is the current behavior?
When attempting to run Yarn on an unsupported version of Node, such as 0.10.48, Yarn exits with the message "Node version 0.10.48 is not supported, please use Node.js 4.0 or higher.". However, it exits with a 0 exit code, which indicates that the command succeeded.

If the current behavior is a bug, please provide the steps to reproduce.

  1. Install an old version of Node, such as 0.10.48 (or run a travis-ci build with language: node_js without specifying the version you want to use)
  2. Run yarn or any other yarn command, and observe the exit code (using echo $? or observing the travis-ci logs in the script phase)

Example travis-ci log (Raw log)

What is the expected behavior?
Given that Yarn can't run successfully in this instance, I would expect it to exit with a non-zero exit code. This would ensure in a CI environment that builds fail rather than appear to succeed even though all installations and tests never ran.

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

  • Node 0.10.48
  • Yarn 1.3.2
  • Ubuntu 14.04.5 LTS

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions