From e607d6fe0b58f71157c2e04dafc185770f6052ed Mon Sep 17 00:00:00 2001 From: Tom Brunet Date: Wed, 10 Jan 2024 14:52:36 -0600 Subject: [PATCH] Remove : from filenames for timestamps due to Windows issues --- common/module/src/report/ACReporterCSV.ts | 2 +- common/module/src/report/ACReporterJSON.ts | 2 +- common/module/src/report/ACReporterXLSX.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/module/src/report/ACReporterCSV.ts b/common/module/src/report/ACReporterCSV.ts index 329d9a779..2cef84cc2 100644 --- a/common/module/src/report/ACReporterCSV.ts +++ b/common/module/src/report/ACReporterCSV.ts @@ -51,7 +51,7 @@ export class ACReporterCSV implements IReporter { } } let startScanD = new Date(startScan); - let reportFilename = `results_${startScanD.toISOString()}.csv`; + let reportFilename = `results_${startScanD.toISOString().replace(/:/g,"-")}.csv`; if (config.outputFilenameTimestamp === false) { reportFilename = `results.csv`; } diff --git a/common/module/src/report/ACReporterJSON.ts b/common/module/src/report/ACReporterJSON.ts index 1fc78acc7..0148854fb 100644 --- a/common/module/src/report/ACReporterJSON.ts +++ b/common/module/src/report/ACReporterJSON.ts @@ -75,7 +75,7 @@ export class ACReporterJSON implements IReporter { } } let startScan = new Date(storedScan.engineReport.summary.startScan); - let reportFilename = `summary_${startScan.toISOString()}.json`; + let reportFilename = `summary_${startScan.toISOString().replace(/:/g,"-")}.json`; if (config.outputFilenameTimestamp === false) { reportFilename = `summary.json`; } diff --git a/common/module/src/report/ACReporterXLSX.ts b/common/module/src/report/ACReporterXLSX.ts index 060f5b8c2..74ef41fcd 100644 --- a/common/module/src/report/ACReporterXLSX.ts +++ b/common/module/src/report/ACReporterXLSX.ts @@ -69,7 +69,7 @@ export class ACReporterXLSX implements IReporter { // const buffer: any = await workbook.xlsx.writeBuffer(); let startScan = new Date(storedReport.engineReport.summary.startScan); - let reportFilename = `results_${startScan.toISOString()}.xlsx`; + let reportFilename = `results_${startScan.toISOString().replace(/:/g,"-")}.xlsx`; if (config.outputFilenameTimestamp === false) { reportFilename = `results.xlsx`; }