Skip to content

Commit ee7a0b1

Browse files
committed
fix: support node < 14 on macOS
1 parent 3257f8e commit ee7a0b1

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

.github/workflows/node-test-mysql.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,9 @@ jobs:
112112
result-encoding: string
113113
script: |
114114
const osVersion = '${{ matrix.os }}';
115-
const nodeVersion = '${{ matrix.version }}';
116115
const isMacOS = osVersion === 'macos-latest' || osVersion.startsWith('macos');
117-
const isMajor14 = nodeVersion === '14' || nodeVersion.startsWith('14.');
118-
if (isMacOS && isMajor14) {
116+
const nodeVersion = parseInt('${{ matrix.version }}'.split('.')[0]);
117+
if (isMacOS && nodeVersion <= 14) {
119118
return 'x64';
120119
} else {
121120
return '';

.github/workflows/node-test.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,9 @@ jobs:
8787
result-encoding: string
8888
script: |
8989
const osVersion = '${{ matrix.os }}';
90-
const nodeVersion = '${{ matrix.version }}';
9190
const isMacOS = osVersion === 'macos-latest' || osVersion.startsWith('macos');
92-
const isMajor14 = nodeVersion === '14' || nodeVersion.startsWith('14.');
93-
if (isMacOS && isMajor14) {
91+
const nodeVersion = parseInt('${{ matrix.version }}'.split('.')[0]);
92+
if (isMacOS && nodeVersion <= 14) {
9493
return 'x64';
9594
} else {
9695
return '';

0 commit comments

Comments
 (0)