Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows 10 return NaN #9

Open
muten84 opened this issue May 13, 2017 · 3 comments
Open

Windows 10 return NaN #9

muten84 opened this issue May 13, 2017 · 3 comments

Comments

@muten84
Copy link

muten84 commented May 13, 2017

I'm trying to use your module as dependencies on an electron app. The code i run is very simple and the promise resolve a NaN value.

The os is Windows 10.

@kevva
Copy link
Collaborator

kevva commented May 18, 2017

What does WMIC Path Win32_Battery Get EstimatedChargeRemaining return if you run it manually?

@betamos
Copy link

betamos commented Mar 15, 2020

Old issue, but still relevant. Confirmed on Windows 10, on a desktop computer without battery.

Related: On both MacOS and Linux, an error is thrown if no battery was found. It would be great if this was the case on Windows as well, then a try-catch block can be used to detect presence of a battery.

Alternatively, return null or false to indicate the absence of a battery to avoid the overhead of throwing an error.

Do you accept pull requests?

@gillstrom
Copy link
Owner

Do you accept pull requests?

Yes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants