MCPcopy Create free account
hub / github.com/ember-cli/ember-cli / isUsingBatteryApm

Function isUsingBatteryApm

lib/models/hardware-info.js:25–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23}
24
25function isUsingBatteryApm() {
26 try {
27 const { stdout } = execa.sync('apm', ['-a']);
28
29 return parseInt(stdout, 10) === 0;
30 } catch (ex) {
31 logger.warn(`Could not get battery status from apm: ${ex}`);
32 logger.warn(ex.stack);
33
34 return null;
35 }
36}
37
38function isUsingBatteryBsd() {
39 const apm = isUsingBatteryApm();

Callers 1

isUsingBatteryBsdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…