-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
set command mishandles bool values #75
Comments
Also that code should be using |
I believe what we should be doing is If that sounds good, feel free to make a PR. Otherwise I can push a fix at some point. |
No, that's not right either, unless I misunderstand. Using The two solutions that work are the original
#77 is the best I can do given the style checker complaints. |
When
--set false
reachescli/lib/control.js
Line 69 in 1cb3bfb
Number.isNaN("false")
evaluates tofalse
, so the conditional passes and the optionset
property becomes the result ofNumber.parseInt("false", 10)
, which isNaN
, which has no effect when the device receives it.A fix is to check for the acceptable string values first, then fall back to
Number.parseInt
.The text was updated successfully, but these errors were encountered: