We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c09e600 commit e23103dCopy full SHA for e23103d
src/commands/test.js
@@ -2,6 +2,7 @@ const { Binary } = require('binary-install-raw')
2
const os = require('os')
3
const chalk = require('chalk')
4
const fetch = require('node-fetch')
5
+const semver = require('semver')
6
7
const HELP = `
8
${chalk.bold('graph test')} ${chalk.dim('[options]')} ${chalk.bold('<datasource>')}
@@ -54,7 +55,7 @@ function getPlatform() {
54
55
const arch = os.arch();
56
const release = os.release();
57
const cpuCore = os.cpus()[0];
- const majorVersion = release.substr(0, release.indexOf('.'));
58
+ const majorVersion = semver.major(release);
59
const isM1 = cpuCore.model.includes("Apple M1");
60
61
if (arch === 'x64' || (arch === 'arm64' && isM1)) {
0 commit comments