Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 70199fb

Browse files
Remove ignore scripts (nuxt requires it) (#1905)
Co-authored-by: Krystle Salazar <[email protected]>
1 parent 7559155 commit 70199fb

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ RUN pnpm fetch
1616
# copy the rest of the content
1717
COPY --chown=node:node . /home/node/app
1818

19-
# `--ignore-scripts` prevents the `prepare` script from running. This avoids
20-
# installation of pre-commit inside the container.
21-
RUN pnpm install -r --offline --ignore-scripts
19+
# Prevent pre-commit from being installed, we don't need it here and it fails to install anyway
20+
ENV SKIP_PRE_COMMIT=true
21+
22+
RUN pnpm install -r --offline
2223

2324
# disable telemetry when building the app
2425
ENV NUXT_TELEMETRY_DISABLED=1

bin/install-pre-commit.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#! /usr/bin/env sh
2+
3+
set -e
4+
5+
if [ -z "$SKIP_PRE_COMMIT" ]
6+
then
7+
echo "installing pre-commit"
8+
pnpm pc:download && pnpm pc:install
9+
else
10+
echo "skipping pre-commit installation"
11+
fi

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"author": "sebworks",
1414
"private": true,
1515
"scripts": {
16-
"prepare": "pnpm pc:download && pnpm pc:install",
16+
"prepare": "./bin/install-pre-commit.sh",
1717
"predev": "pnpm install && pnpm i18n:no-get",
1818
"dev": "pnpm dev:only",
1919
"dev:only": "nuxt --hostname 0.0.0.0",

0 commit comments

Comments
 (0)