You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix: get status and capacity with multiple power_supplies
It is possible that $BAT contains multiple power_supplies like
```bash
/sys/class/power_supply/AC
/sys/class/power_supply/BAT0
/sys/class/power_supply/ucsi-source-psy-USBC000:001
```
In such a case, the original code becomes
`cat AC BAT0 ucsi-source-psy-USBC000:001/status` (path prefix omitted). It fails
to run because you cannot `cat` a directory.
0 commit comments