mirror of
https://github.com/morgan9e/gnome-shell-extension-freon
synced 2026-04-15 00:44:22 +09:00
fix for incorrect lm_sensors out #114
This commit is contained in:
@@ -47,7 +47,9 @@ var SensorsUtil = class extends CommandLineUtil.CommandLineUtil {
|
|||||||
try {
|
try {
|
||||||
// fix for wrong lm_sensors output
|
// fix for wrong lm_sensors output
|
||||||
// https://github.com/UshakovVasilii/gnome-shell-extension-freon/issues/114#issuecomment-491613545
|
// https://github.com/UshakovVasilii/gnome-shell-extension-freon/issues/114#issuecomment-491613545
|
||||||
data = JSON.parse(this._output.filter(l => l.trim() !== ',').join(''));
|
let lineRemoved = this._output.filter(l => l.trim() !== ',').join('\n');
|
||||||
|
let errorRemoved = lineRemoved.replace(/ERROR.*Can't read/, "");
|
||||||
|
data = JSON.parse(errorRemoved);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
global.log(e.toString());
|
global.log(e.toString());
|
||||||
return [];
|
return [];
|
||||||
|
|||||||
Reference in New Issue
Block a user