Skip to content

Commit b92577b

Browse files
committed
fix: fix vercel's use of corepack during the ignoreCommand
1 parent aa8a022 commit b92577b

File tree

8 files changed

+22
-25
lines changed

8 files changed

+22
-25
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ __pycache__
2424
.next
2525
.turbo/
2626
.cursorrules
27+
.corepack

apps/api-reference/vercel.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
{
22
"$schema": "https://openapi.vercel.sh/vercel.json",
3-
"ignoreCommand": "pnpm dlx turbo-ignore --fallback=HEAD^",
4-
"env": {
5-
"ENABLE_EXPERIMENTAL_COREPACK": "1"
6-
}
3+
"ignoreCommand": "../../vercel-ignore.sh"
74
}

apps/entropy-debugger/vercel.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
{
22
"$schema": "https://openapi.vercel.sh/vercel.json",
3-
"ignoreCommand": "pnpm dlx turbo-ignore --fallback=HEAD^",
4-
"env": {
5-
"ENABLE_EXPERIMENTAL_COREPACK": "1"
6-
}
3+
"ignoreCommand": "../../vercel-ignore.sh"
74
}

apps/insights/vercel.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
{
22
"$schema": "https://openapi.vercel.sh/vercel.json",
3-
"ignoreCommand": "pnpm dlx turbo-ignore --fallback=HEAD^",
4-
"env": {
5-
"ENABLE_EXPERIMENTAL_COREPACK": "1"
6-
}
3+
"ignoreCommand": "../../vercel-ignore.sh"
74
}

apps/staking/vercel.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
{
22
"$schema": "https://openapi.vercel.sh/vercel.json",
3-
"ignoreCommand": "pnpm dlx turbo-ignore --fallback=HEAD^",
4-
"env": {
5-
"ENABLE_EXPERIMENTAL_COREPACK": "1"
6-
}
3+
"ignoreCommand": "../../vercel-ignore.sh"
74
}
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
{
22
"$schema": "https://openapi.vercel.sh/vercel.json",
3-
"ignoreCommand": "pnpm dlx turbo-ignore --fallback=HEAD^",
4-
"env": {
5-
"ENABLE_EXPERIMENTAL_COREPACK": "1"
6-
}
3+
"ignoreCommand": "../../../../vercel-ignore.sh"
74
}
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
{
22
"$schema": "https://openapi.vercel.sh/vercel.json",
33
"buildCommand": "turbo --filter @pythnetwork/component-library build:storybook",
4-
"ignoreCommand": "pnpm dlx turbo-ignore --fallback=HEAD^",
4+
"ignoreCommand": "../../vercel-ignore.sh",
55
"framework": null,
6-
"outputDirectory": "storybook-static",
7-
"env": {
8-
"ENABLE_EXPERIMENTAL_COREPACK": "1"
9-
}
6+
"outputDirectory": "storybook-static"
107
}

vercel-ignore.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/sh
2+
3+
# Vercel currently does not properly enable corepack when running the
4+
# ignoreCommand. This was recommended as a stopgap by Vercel support until they
5+
# fix that issue.
6+
COREPACK_ROOT="$PWD/.corepack"
7+
COREPACK_SHIM="$COREPACK_ROOT/shim"
8+
export COREPACK_HOME="$COREPACK_ROOT/home"
9+
export PATH="$COREPACK_SHIM:$PATH"
10+
mkdir -p "$COREPACK_HOME"
11+
mkdir -p "$COREPACK_SHIM"
12+
corepack enable --install-directory "$COREPACK_SHIM"
13+
14+
exec pnpm dlx turbo-ignore --fallback=HEAD^

0 commit comments

Comments
 (0)