Make Docker pnpm install resilient to sharp ignored-builds; drop
Docker / build (push) Successful in 1m26s
Docker / build (push) Successful in 1m26s
unreachable gha cache
This commit is contained in:
+6
-1
@@ -24,7 +24,12 @@ RUN --mount=type=cache,target=/root/.npm \
|
||||
elif [ -f yarn.lock ]; then \
|
||||
corepack enable yarn && yarn install --frozen-lockfile --production=false; \
|
||||
elif [ -f pnpm-lock.yaml ]; then \
|
||||
corepack enable pnpm && pnpm install --frozen-lockfile; \
|
||||
# --config.strictDepBuilds=false: pnpm 11 hard-fails (ERR_PNPM_IGNORED_BUILDS)
|
||||
# when a dependency with a build script (e.g. sharp) isn't explicitly approved.
|
||||
# sharp ships prebuilt binaries so its build script is unnecessary; this flag
|
||||
# downgrades the gate to a warning and keeps the build resilient regardless of
|
||||
# pnpm-workspace.yaml's allowBuilds value. See CLAUDE.md "pnpm / sharp build".
|
||||
corepack enable pnpm && pnpm install --frozen-lockfile --config.strictDepBuilds=false; \
|
||||
else \
|
||||
echo "No lockfile found." && exit 1; \
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user