chore: fix install from git with production flag
reference:
https://github.com/typicode/husky/issues/914#issuecomment-1046274220
https://github.com/typicode/husky/issues/920#issuecomment-1202503697
fix: bc162849da (commitcomment-117186018)
fix: #12686
This commit is contained in:
parent
d169b9c37f
commit
9b31d57095
|
|
@ -18,6 +18,8 @@ jobs:
|
|||
if: github.repository == 'DIYgod/RSSHub'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
env:
|
||||
HUSKY: 0
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: pnpm/action-setup@v2
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ COPY ./package.json /app/
|
|||
RUN \
|
||||
set -ex && \
|
||||
export PUPPETEER_SKIP_DOWNLOAD=true && \
|
||||
npm pkg delete scripts.prepare && \
|
||||
corepack enable pnpm && \
|
||||
pnpm install --prod --frozen-lockfile && \
|
||||
pnpm rb
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
"jest:coverage": "cross-env NODE_ENV=test jest --coverage --reporters=default --reporters=jest-junit --runInBand --forceExit --detectOpenHandles",
|
||||
"jest:watch": "cross-env NODE_ENV=test jest --watch",
|
||||
"lint": "eslint .",
|
||||
"prepare": "node ./scripts/prepare.js",
|
||||
"prepare": "node -e \"try { require('husky').install() } catch (e) {if (e.code !== 'MODULE_NOT_FOUND') throw e}\"",
|
||||
"profiling": "NODE_ENV=production node --prof lib/index.js",
|
||||
"start": "node lib/index.js",
|
||||
"test": "npm run format:check && npm run jest:coverage"
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
const isCi = process.env.CI !== undefined;
|
||||
if (!isCi) {
|
||||
require('husky').install();
|
||||
}
|
||||
Loading…
Reference in New Issue