Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: lifecycle script triggering despite enableScripts=false #6258

Open
1 task done
legobeat opened this issue Apr 30, 2024 · 1 comment · May be fixed by #6280
Open
1 task done

[Bug]: lifecycle script triggering despite enableScripts=false #6258

legobeat opened this issue Apr 30, 2024 · 1 comment · May be fixed by #6280
Labels
bug Something isn't working

Comments

@legobeat
Copy link

legobeat commented Apr 30, 2024

Self-service

  • I'd be willing to implement a fix

Describe the bug

It seems that for dependencies which themselves contain a yarn v1 lockfile, the enableScripts configuration value is ignored and lifecycle scripts are run regardless.

To reproduce

(Aside: The sherlock link in the GH template is 404ing)

  • Set enableScripts: false in .yarnrc.yaml
  • Add package with yarn v1 yarn.lock to dependencies
  • Run yarn install

A reproduction PR on a minimal repo is available. As can be seen in the GitHub Actions workflow output from the yarn install step, the dependency preinstall and postinstall lifecycle scripts are triggered as part of the Resolution step.

Environment

System:
    OS: Linux 6.8 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
    CPU: (10) x64 12th Gen Intel(R) Core(TM)
  Binaries:
    Node: 20.12.2 - /tmp/xfs-a3ccc8fc/node
    Yarn: 4.1.1 - /tmp/xfs-a3ccc8fc/yarn
    npm: 10.5.0 - /usr/local/bin/npm

Additional context

@legobeat legobeat added the bug Something isn't working label Apr 30, 2024
@legobeat legobeat changed the title [Bug?]: lifecycle script triggering despite enableScripts=false [Bug]: lifecycle script triggering despite enableScripts=false Apr 30, 2024
@legobeat
Copy link
Author

legobeat commented May 2, 2024

@arcanis @merceyz PTAL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant