Skip to content

Commit 245dada

Browse files
committed
Debug fallback issue for yarn
1 parent 4d7ee53 commit 245dada

1 file changed

Lines changed: 17 additions & 16 deletions

File tree

.diploi/helm/app.yaml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -39,23 +39,24 @@ spec:
3939
image: {{ .Values.images.app }}
4040
imagePullPolicy: Always
4141
command:
42-
- /bin/sh
43-
- -c
44-
- |
45-
if [ -f yarn.lock ]; then
46-
yarn --frozen-lockfile
47-
if [ $? -ne 0 ]; then
48-
echo "Retrying yarn install without frozen lockfile"
49-
yarn install
50-
fi
51-
elif [ -f package-lock.json ]; then npm ci || npm i; \
52-
elif [ -f pnpm-lock.yaml ]; then pnpm i --frozen-lockfile || pnpm i; \
53-
elif [ -f package.json ]; then
54-
echo "Lockfile not found. Falling back to npm i (non-deterministic install).";
55-
npm i;
56-
else
57-
echo "No package manifest found. Skipping install.";
42+
- /bin/sh
43+
- -c
44+
- |
45+
if [ -f yarn.lock ]; then
46+
if ! yarn --frozen-lockfile; then
47+
echo "Retrying yarn install without frozen lockfile"
48+
yarn install
5849
fi
50+
elif [ -f package-lock.json ]; then
51+
npm ci || npm install
52+
elif [ -f pnpm-lock.yaml ]; then
53+
pnpm install --frozen-lockfile || pnpm install
54+
elif [ -f package.json ]; then
55+
echo "Lockfile not found. Falling back to npm install (non-deterministic install)."
56+
npm install
57+
else
58+
echo "No package manifest found. Skipping install."
59+
fi
5960
workingDir: /app{{ .Values.folder }}
6061
env:
6162
- name: NODE_ENV

0 commit comments

Comments
 (0)