Skip to content

Commit

Permalink
fix: Gracefully handle iw process not spawning
Browse files Browse the repository at this point in the history
  • Loading branch information
Hypfer committed Feb 9, 2025
1 parent 5b66c35 commit 0086080
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ class LinuxWifiConfigurationCapability extends WifiConfigurationCapability {
:-)
*/
const iwOutput = spawnSync("iw", ["dev", this.networkInterface, "link"]).stdout.toString();
const wifiStatus = this.parseIwStdout(iwOutput);
const iwOutput = spawnSync("iw", ["dev", this.networkInterface, "link"]);
const wifiStatus = this.parseIwStdout(iwOutput.stdout?.toString() || "");

//IPs are not part of the iw output
if (wifiStatus.state === ValetudoWifiStatus.STATE.CONNECTED) {
Expand Down

0 comments on commit 0086080

Please sign in to comment.