AndiDittrich / NodeMCU-Tool

:wrench: Upload + Manage Lua files on NodeMCU
https://www.npmjs.com/package/nodemcu-tool
MIT License
310 stars 54 forks source link

A little change for output-list of devices in json format. #61

Closed johnnycubides closed 5 years ago

johnnycubides commented 5 years ago

https://github.com/AndiDittrich/NodeMCU-Tool/blob/19b3ec66e7d298438246adb4c11457e8406aaf34/lib/cli/nodemcu-tool.js#L327

Hello, In line 327, I think that should be serialDevices instead devices; what do you think?

GNU/Linux Debian 10. Before the change: $ ./nodemcu-tool.js devices --json [device] ~ Cannot retrieve serial device list -

After the change $ ./nodemcu-tool.js devices --json [{"manufacturer":"Silicon Labs","serialNumber":"0001","pnpId":"usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0001-if00-port0","vendorId":"10c4","productId":"ea60","comName":"/dev/ttyUSB1"},{"manufacturer":"Silicon Labs","serialNumber":"0001","pnpId":"usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0001-if00-port0","vendorId":"10c4","productId":"ea60","comName":"/dev/ttyUSB0"}]

Regards Johnny Cubides.

AndiDittrich commented 5 years ago

Hi @johnnycubides ,

thanks for that hint, i will fix is asap