mirror of
https://github.com/cypress-io/cypress.git
synced 2026-05-01 04:20:23 -05:00
fix: move from getos to systeminformation to fix OS distro/release info (#32283)
* fix: move from getos to systeminformation * add changelog entry * remove extraneous package that isn't used * update changelog
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
const os = require('os')
|
||||
const Promise = require('bluebird')
|
||||
const getos = Promise.promisify(require('getos'))
|
||||
const si = require('systeminformation')
|
||||
|
||||
const getOsVersion = () => {
|
||||
return Promise.try(() => {
|
||||
if (os.platform() === 'linux') {
|
||||
return getos()
|
||||
.then((obj) => {
|
||||
return [obj.dist, obj.release].join(' - ')
|
||||
}).catch(() => {
|
||||
return os.release()
|
||||
})
|
||||
}
|
||||
return si.osInfo()
|
||||
.then((osInfo) => {
|
||||
if (osInfo.distro && osInfo.release) {
|
||||
return `${osInfo.distro} - ${osInfo.release}`
|
||||
}
|
||||
|
||||
return os.release()
|
||||
return os.release()
|
||||
}).catch(() => {
|
||||
return os.release()
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,6 @@
|
||||
"fs-extra": "9.1.0",
|
||||
"geckodriver": "5.0.0",
|
||||
"get-port": "5.1.1",
|
||||
"getos": "3.2.1",
|
||||
"glob": "7.1.3",
|
||||
"graceful-fs": "4.2.9",
|
||||
"http-proxy": "1.18.1",
|
||||
|
||||
Reference in New Issue
Block a user