corepack icon indicating copy to clipboard operation
corepack copied to clipboard

Silent option on corepack

Open Qwarctick opened this issue 1 year ago • 1 comments

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.

Qwarctick avatar Apr 09 '24 06:04 Qwarctick

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

merceyz avatar Apr 09 '24 09:04 merceyz

This issue can be closed, as COREPACK_ENABLE_DOWNLOAD_PROMPT=0 enables the silent option requested.

trivikr avatar Jul 17 '24 02:07 trivikr