Skip to content

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

@adam-thomas-privitar

Description

@adam-thomas-privitar

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 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 11.6
    CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
  Binaries:
    Node: 14.17.0 - /private/var/folders/t1/kyx57bk12hs04wln8l_5z2m00000gn/T/xfs-44831458/node
    Yarn: 3.2.0 - /private/var/folders/t1/kyx57bk12hs04wln8l_5z2m00000gn/T/xfs-44831458/yarn
    npm: 6.14.13 - ~/.nvm/versions/node/v14.17.0/bin/npm

Additional context

No response

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