Skip to content

Commit 6758504

Browse files
authored
[corepack] Make opt-in (#1905)
## Summary TSIA ## How was it tested?
1 parent e0d0c06 commit 6758504

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

plugins/nodejs.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/jetpack-io/devbox/main/.schema/devbox-plugin.schema.json",
3-
"version": "0.0.1",
3+
"version": "0.0.2",
44
"name": "nodejs",
5-
"readme": "Devbox automatically configures Corepack for Nodejs. You can install Yarn or Pnpm by adding them to your `package.json` file using `packageManager`\nCorepack binaries will be installed in your local `.devbox` directory",
6-
"env" : {
7-
"PATH": "{{ .Virtenv }}/corepack-bin/:$PATH"
8-
},
5+
"readme": "Devbox automatically configures Corepack for Nodejs when DEVBOX_COREPACK_ENABLED=1. You can install Yarn or Pnpm by adding them to your `package.json` file using `packageManager`\nCorepack binaries will be installed in your local `.devbox` directory",
96
"shell": {
107
"init_hook": [
11-
"mkdir -p {{ .Virtenv }}/corepack-bin",
12-
"corepack enable --install-directory \"{{ .Virtenv }}/corepack-bin/\""
8+
"test -z $DEVBOX_COREPACK_ENABLED || corepack enable --install-directory \"{{ .Virtenv }}/corepack-bin/\"",
9+
"test -z $DEVBOX_COREPACK_ENABLED || export PATH=\"{{ .Virtenv }}/corepack-bin/:$PATH\""
1310
]
11+
},
12+
"create_files": {
13+
"{{ .Virtenv }}/corepack-bin": ""
1414
}
1515
}

0 commit comments

Comments
 (0)