nodejs / corepack

Zero-runtime-dependency package acting as bridge between Node projects and their package managers
MIT License
2.31k stars 146 forks source link

Silent option on corepack #452

Open Qwarctick opened 3 months ago

Qwarctick commented 3 months ago

Hello,

I use corepack with yarn in a docker image. But when I run an interactive command with my container, I get the following message:

Corepack is about to download https://repo.yarnpkg.com/4.1.0/packages/yarnpkg-cli/bin/yarn.js.
Do you want to continue? [Y/n]

Is it possible to disable this behavior? I know that if I run the container without TTY, it disables the interactive question, but it's not possible in my context.

merceyz commented 3 months ago

You can use COREPACK_ENABLE_DOWNLOAD_PROMPT=0, see https://github.com/nodejs/corepack/blob/467216281e1719a739d0eeea370b335adfb37b8d/README.md#environment-variables.