seydx / homebridge-philipsair-platform

Homebridge plugin for philips air purifier and humidifier.
MIT License
25 stars 14 forks source link

Fails to execute if pyaircontrol.py path contains spaces #68

Open Nodman opened 2 years ago

Nodman commented 2 years ago

Describe the bug Plugins fails to execute pyaircontrol.py if path contains spaces, im my case Mac OS folder named "Application Support"

To Reproduce

Expected behavior Plugin works as expected

Logs

[4/18/2022, 2:01:12 PM] [PhilipsAirPlatform] Error: Command failed: python3 /Users/name/Library/Application Support/fnm/node-versions/v16.14.2/installation/lib/node_modules/homebridge-philipsair-platform/lib/pyaircontrol.py -H 192.168.88.11 -P 5683 set pwr=0
/usr/local/Cellar/python@3.10/3.10.2/bin/python3: can't open file '/Users/name/Library/Application': [Errno 2] No such file or directory

    at ChildProcess.exithandler (node:child_process:399:12)
    at ChildProcess.emit (node:events:526:28)
    at maybeClose (node:internal/child_process:1092:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) {
  killed: false,
  code: 2,
  signal: null,
  cmd: 'python3 /Users/name/Library/Application Support/fnm/node-versions/v16.14.2/installation/lib/node_modules/homebridge-philipsair-platform/lib/pyaircontrol.py -H 192.168.88.11 -P 5683 set pwr=0'
}

Screenshots

Environment