homebridge-melcloud-control 4.4.1-beta.21 → 4.4.1-beta.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/functions.js +7 -6
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "MELCloud Control",
|
|
3
3
|
"name": "homebridge-melcloud-control",
|
|
4
|
-
"version": "4.4.1-beta.
|
|
4
|
+
"version": "4.4.1-beta.22",
|
|
5
5
|
"description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grzegorz914",
|
package/src/functions.js
CHANGED
|
@@ -78,12 +78,13 @@ class Functions extends EventEmitter {
|
|
|
78
78
|
await access('/.dockerenv');
|
|
79
79
|
isDocker = true;
|
|
80
80
|
} catch { }
|
|
81
|
+
|
|
81
82
|
try {
|
|
82
|
-
const { stdout } = await execPromise('cat /proc/1/cgroup
|
|
83
|
+
const { stdout } = await execPromise('cat /proc/1/cgroup');
|
|
83
84
|
if (stdout.includes('docker') || stdout.includes('containerd')) isDocker = true;
|
|
84
85
|
} catch { }
|
|
85
86
|
|
|
86
|
-
const result = { path: null, arch, system:
|
|
87
|
+
const result = { path: null, arch, system: 'unknown' };
|
|
87
88
|
|
|
88
89
|
/* ===================== macOS ===================== */
|
|
89
90
|
if (isMac) {
|
|
@@ -127,7 +128,7 @@ class Functions extends EventEmitter {
|
|
|
127
128
|
try {
|
|
128
129
|
await access(path, fs.constants.X_OK);
|
|
129
130
|
result.path = path;
|
|
130
|
-
result.system = '
|
|
131
|
+
result.system = 'Qnap';
|
|
131
132
|
return result;
|
|
132
133
|
} catch { }
|
|
133
134
|
}
|
|
@@ -202,9 +203,9 @@ class Functions extends EventEmitter {
|
|
|
202
203
|
}
|
|
203
204
|
|
|
204
205
|
return result;
|
|
205
|
-
} catch (
|
|
206
|
-
if (this.logError) this.emit('error', `Chromium detection error: ${
|
|
207
|
-
return { path: null, arch: 'unknown' };
|
|
206
|
+
} catch (error) {
|
|
207
|
+
if (this.logError) this.emit('error', `Chromium detection error: ${error.message}`);
|
|
208
|
+
return { path: null, arch: 'unknown', system: 'unknown' };
|
|
208
209
|
}
|
|
209
210
|
}
|
|
210
211
|
|