feat: export as json

This commit is contained in:
HugoPoi 2021-02-19 23:52:30 +01:00
parent 6d8c5e96c9
commit 124eb02e97

View File

@ -28,8 +28,11 @@ async function main(options) {
};
}
goproTelemetry(res, _.omit(options, ['_', 'input', 'output']), telemetry => {
fs.writeFileSync(options.output, telemetry);
goproTelemetry(res, _.omit(options, ['_', 'input', 'output']), telemetryData => {
if (!_.isString(telemetryData)) {
telemetryData = JSON.stringify(telemetryData);
}
fs.writeFileSync(options.output, telemetryData);
});
}