nodejs / corepack

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

Add quite mode when download file #478

Closed Mr-Python-in-China closed 1 month ago

Mr-Python-in-China commented 1 month ago

I'm working in a devcontainer. The project uses yarn 4 and I wrote it in packageManager. I wrote RUN corepack enable in Dockerfile, then I use "postCreateCommand": "yarn" in devcontainer.json. However, I have to press "enter" to allow NodeJS download yarn.

[7802 ms] Start: Run in container: /bin/sh -c yarn
Corepack is about to download https://repo.yarnpkg.com/4.2.1/packages/yarnpkg-cli/bin/yarn.js.

Do you want to continue? [Y/n] 

Is there any way to download the package manager automatically?

aduh95 commented 1 month ago

https://github.com/nodejs/corepack/blob/a62cd7b977a71a534ef8fb01cbfe944b59162b22/README.md#L246-L252