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:
Jennifer Shehane
2025-08-27 09:52:48 -04:00
committed by GitHub
parent fa0b716eb7
commit ab2004bbde
7 changed files with 59 additions and 43 deletions
+10 -10
View File
@@ -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()
})
})
}
-1
View File
@@ -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",