mirror of
https://github.com/msojocs/wechat-web-devtools-linux.git
synced 2025-07-22 00:00:04 +08:00
test: fix gnomeVersion.length
This commit is contained in:
parent
7c24ba198f
commit
439ca22788
@ -17,7 +17,7 @@ class CheckDark {
|
|||||||
case "gnome":
|
case "gnome":
|
||||||
case "gnome-classic":
|
case "gnome-classic":
|
||||||
const gnomeVersion = execSync(`gnome-shell --version`).toString().replace(/[\r\n]/g, "").split(" ")
|
const gnomeVersion = execSync(`gnome-shell --version`).toString().replace(/[\r\n]/g, "").split(" ")
|
||||||
const gnomeVersionNum = gnomeVersion.length ? Number(gnomeVersion[2]) : 0
|
const gnomeVersionNum = gnomeVersion.length == 3 ? Number(gnomeVersion[2]) : 0
|
||||||
if (gnomeVersionNum >= 42) {
|
if (gnomeVersionNum >= 42) {
|
||||||
monitor = spawn("gsettings", [
|
monitor = spawn("gsettings", [
|
||||||
"monitor",
|
"monitor",
|
||||||
@ -67,7 +67,7 @@ class CheckDark {
|
|||||||
case "gnome-classic":
|
case "gnome-classic":
|
||||||
// 判断 Gnome-Shell 版本
|
// 判断 Gnome-Shell 版本
|
||||||
const gnomeVersion = execSync(`gnome-shell --version`).toString().replace(/[\r\n]/g, "").split(" ")
|
const gnomeVersion = execSync(`gnome-shell --version`).toString().replace(/[\r\n]/g, "").split(" ")
|
||||||
const gnomeVersionNum = gnomeVersion.length ? Number(gnomeVersion[2]) : 0
|
const gnomeVersionNum = gnomeVersion.length == 3 ? Number(gnomeVersion[2]) : 0
|
||||||
if (gnomeVersionNum >= 42) {
|
if (gnomeVersionNum >= 42) {
|
||||||
theme = execSync(
|
theme = execSync(
|
||||||
`gsettings get org.gnome.desktop.interface color-scheme`
|
`gsettings get org.gnome.desktop.interface color-scheme`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user