mirror of
https://github.com/jimeh/macos-battery-exporter.git
synced 2026-02-19 09:26:40 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cdac9396fc | ||
|
993b036d99
|
2
.github/.release-please-manifest.json
vendored
2
.github/.release-please-manifest.json
vendored
@@ -1,3 +1,3 @@
|
||||
{
|
||||
".": "0.0.1"
|
||||
".": "0.0.2"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# Changelog
|
||||
|
||||
## [0.0.2](https://github.com/jimeh/macos-battery-exporter/compare/v0.0.1...v0.0.2) (2023-12-16)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **battery:** find ioreg executable more reliably ([993b036](https://github.com/jimeh/macos-battery-exporter/commit/993b036d99362b6bebd36545fc34d325863421d5))
|
||||
|
||||
## 0.0.1 (2023-12-16)
|
||||
|
||||
|
||||
|
||||
@@ -34,7 +34,15 @@ type batteryRaw struct {
|
||||
}
|
||||
|
||||
func getAllRaw() ([]*batteryRaw, error) {
|
||||
b, err := exec.Command("ioreg", "-ra", "-c", "AppleSmartBattery").Output()
|
||||
ioreg, err := exec.LookPath("ioreg")
|
||||
if err != nil {
|
||||
ioreg, err = exec.LookPath("/usr/sbin/ioreg")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
b, err := exec.Command(ioreg, "-ra", "-c", "AppleSmartBattery").Output()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user