CLI File Export (Extra Row being created)

When you export to a file using the CLI if you check the end of the output file there is an extra blank row generated, why?

Hi, @Mooihoek!

Which result of the CLI are you exporting?
Can you provide more details of your use case to understand how it affects you, please?

Hi @nayelyz I’m using the following command:

smartthings.exe devices:history -j test

When I export a file using e.g. smartthings devices:history [ID} -j -o test.json the output file ends with the closing ] on a line by itself. If I export to YAML instead the last line is blank but given indentation is significant in YAML that is either correct or a good idea.

If you use standard output e.g. smartthings devices:history [ID] -j > test.json then the extra line the CLI normally outputs to the screen ends up in the file too, which I guess might seem a little strange.

thanks @orangebucket If I use smartthings devices:history [ID} -j -o test.json the extra line is not there.