iaincollins / structured-data-testing-tool

A library and command line tool to help inspect and test for Structured Data.
https://www.npmjs.com/package/structured-data-testing-tool
ISC License
64 stars 14 forks source link

Fixing CLI not outputting HTML / JSON files as incorrect variable was… #27

Closed dolukhanov closed 2 years ago

dolukhanov commented 4 years ago

Summary

Fix for CLI not outputting HTML / JSON files

Detail

The CLI allows HTML and JSON files to be created using -o [filename] or --output [filename]. This feature was not working and returned "Unable to fetch content from [URL]" error. This was due to err.res being passed to the file writer instead of res (err.res should be used in the catch statement).