Skip to content

[Bug?]: Workspace focus feature does not respect enableScripts config #4547

@MagnusHJensen

Description

@MagnusHJensen

Self-service

  • I'd be willing to implement a fix

Describe the bug

When using the workspace focus feature, the enableScripts setting is not respected in that if it is false, the postinstall's still seem to be executed. This is the case wether its in .yarnrc.yml or used an env var for example yarn_enable_scripts=false yarn workspaces focus -A --production.

To reproduce

I was unable to use sherlock because I couldnt see how to pass the yarn_enable_scripts=false. Let me know if theres a way.

Basically need a package.json with a echo hello postinstall script. Then execute yarn_enable_scripts=false yarn workspaces focus -A --production and observe hello is echoed.

Environment

System:
    OS: macOS 12.1
    CPU: (10) x64 Apple M1 Pro
  Binaries:
    Node: 14.18.2 - /private/var/folders/lr/sq4c_jm56k51tdjj57gj2dc00000gp/T/xfs-7b848785/node
    Yarn: 3.2.1 - /private/var/folders/lr/sq4c_jm56k51tdjj57gj2dc00000gp/T/xfs-7b848785/yarn
    npm: 6.14.15 - ~/.nvm/versions/node/v14.18.2/bin/npm

Additional context

Same as #4386

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleIssues that didn't get attention

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions