fix: error:0308010C:digital envelope routines::unsupported (#1447)
* fix: error:0308010C:digital envelope routines::unsupported * fix: process.env.UNSET_NODE_OPTIONS
This commit is contained in:
parent
f8a11cbbf0
commit
2dc9c5c444
9
.github/workflows/nocobase-test.yml
vendored
9
.github/workflows/nocobase-test.yml
vendored
@ -19,7 +19,7 @@ jobs:
|
|||||||
sqlite-test:
|
sqlite-test:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node_version: ['16']
|
node_version: ['16', '18']
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: node:${{ matrix.node_version }}
|
container: node:${{ matrix.node_version }}
|
||||||
steps:
|
steps:
|
||||||
@ -30,6 +30,7 @@ jobs:
|
|||||||
node-version: ${{ matrix.node_version }}
|
node-version: ${{ matrix.node_version }}
|
||||||
cache: 'yarn'
|
cache: 'yarn'
|
||||||
- run: yarn install
|
- run: yarn install
|
||||||
|
- run: yarn build
|
||||||
- name: Test with Sqlite
|
- name: Test with Sqlite
|
||||||
run: yarn test
|
run: yarn test
|
||||||
env:
|
env:
|
||||||
@ -39,7 +40,7 @@ jobs:
|
|||||||
postgres-test:
|
postgres-test:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node_version: ['16']
|
node_version: ['16', '18']
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: node:${{ matrix.node_version }}
|
container: node:${{ matrix.node_version }}
|
||||||
@ -66,6 +67,7 @@ jobs:
|
|||||||
node-version: ${{ matrix.node_version }}
|
node-version: ${{ matrix.node_version }}
|
||||||
cache: 'yarn'
|
cache: 'yarn'
|
||||||
- run: yarn install
|
- run: yarn install
|
||||||
|
- run: yarn build
|
||||||
- name: Test with postgres
|
- name: Test with postgres
|
||||||
run: yarn test
|
run: yarn test
|
||||||
env:
|
env:
|
||||||
@ -79,7 +81,7 @@ jobs:
|
|||||||
mysql-test:
|
mysql-test:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node_version: ['16']
|
node_version: ['16', '18']
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: node:${{ matrix.node_version }}
|
container: node:${{ matrix.node_version }}
|
||||||
services:
|
services:
|
||||||
@ -97,6 +99,7 @@ jobs:
|
|||||||
node-version: ${{ matrix.node_version }}
|
node-version: ${{ matrix.node_version }}
|
||||||
cache: 'yarn'
|
cache: 'yarn'
|
||||||
- run: yarn install
|
- run: yarn install
|
||||||
|
- run: yarn build
|
||||||
- name: Test with MySQL
|
- name: Test with MySQL
|
||||||
run: yarn test
|
run: yarn test
|
||||||
env:
|
env:
|
||||||
|
@ -35,6 +35,21 @@ for (const key in env) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (require('semver').satisfies(process.version, '>16') && !process.env.UNSET_NODE_OPTIONS) {
|
||||||
|
if (process.env.NODE_OPTIONS) {
|
||||||
|
let opts = process.env.NODE_OPTIONS;
|
||||||
|
if (!opts.includes('--openssl-legacy-provider')) {
|
||||||
|
opts = opts + ' --openssl-legacy-provider';
|
||||||
|
}
|
||||||
|
if (!opts.includes('--no-experimental-fetch')) {
|
||||||
|
opts = opts + ' --no-experimental-fetch';
|
||||||
|
}
|
||||||
|
process.env.NODE_OPTIONS = opts;
|
||||||
|
} else {
|
||||||
|
process.env.NODE_OPTIONS = '--openssl-legacy-provider --no-experimental-fetch';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const cli = require('../src/cli');
|
const cli = require('../src/cli');
|
||||||
|
|
||||||
cli.parse(process.argv);
|
cli.parse(process.argv);
|
||||||
|
Loading…
Reference in New Issue
Block a user