-
Notifications
You must be signed in to change notification settings - Fork 400
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…1009) * Allow installing `yarn` via `corepack` on Debian-based systems, too The default behavior remains unchanged, but users can now opt-out from the APT-based installation to get the latest `yarn` via `corepack`. Closes #1004 * Update src/node/devcontainer-feature.json Co-authored-by: Samruddhi Khandale <samruddhikhandale@github.com> * Update src/node/devcontainer-feature.json Co-authored-by: Samruddhi Khandale <samruddhikhandale@github.com> * Rename variable * Expand comment * Add test scenario * Improve tests * Update test/node/debian_yarn_from_corepack.sh * Betetr comments * Update src/node/devcontainer-feature.json --------- Co-authored-by: Samruddhi Khandale <samruddhikhandale@github.com>
- Loading branch information
1 parent
7953318
commit 62f7f7f
Showing
4 changed files
with
39 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Optional: Import test library | ||
source dev-container-features-test-lib | ||
|
||
# Definition specific tests | ||
YARN_VERSION="4.3.0" | ||
|
||
# Corepack provides shims for package managers like yarn. The first time yarn is invoked via the "yarn" | ||
# command, corepack will interactively request permission to download the yarn binary. To | ||
# avoid this interactive mode and download the binary automatically, we explicitly call "corepack use yarn" | ||
# instead (doesn't require user input). Once that command completes, "yarn" can be used in a non-interactive mode. | ||
check "yarn shim location" bash -c ". /usr/local/share/nvm/nvm.sh && type yarn &> /dev/null" | ||
check "download yarn" bash -c ". /usr/local/share/nvm/nvm.sh && corepack use yarn@${YARN_VERSION}" | ||
check "yarn version" bash -c ". /usr/local/share/nvm/nvm.sh && yarn --version | grep ${YARN_VERSION}" | ||
|
||
# Report result | ||
reportResults |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters