Skip to content

Errors from optionalDependency installation scripts should be ignored #1059

@chuwik

Description

@chuwik

Do you want to request a feature or report a bug?
Bug, for compatibility with npm

What is the current behavior?
If an optionalDependency install script fails, the whole 'yarn install' fails.
With npm client, these errors are ignored and the install succeeds.

If the current behavior is a bug, please provide the steps to reproduce.
The sinopia npm package has an optionalDependency on fs-ext, whose install script fails in Windows. This is a known issue, but since it is optional the errors get ignored with 'npm install'; but fails with 'yarn'.

In a Windows machine:
yarn add sinopia

This happens even if ignore-optional=true.
If ignore-scripts=true, error goes away.

What is the expected behavior?
'yarn install' prints out the errors, but the installation succeeds.

Please mention your node.js, yarn and operating system version.
node.js 6.7.0
yarn 0.15.1
Windows 10

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions