From 8d07b20087ce20605e34b50316dda8ecf26b7e6a Mon Sep 17 00:00:00 2001 From: Swarit Pandey Date: Mon, 9 Sep 2024 05:12:41 +0000 Subject: [PATCH] fix: fix issue --- src/post/index.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/post/index.ts b/src/post/index.ts index afe0989..9cd167d 100644 --- a/src/post/index.ts +++ b/src/post/index.ts @@ -208,10 +208,21 @@ async function processResults(): Promise { async function run(): Promise { try { stopKnoxctlScan(); - await new Promise((resolve) => setTimeout(resolve, 9000)); - await processResults(); + + // Increase wait time and add file system sync + await new Promise((resolve) => setTimeout(resolve, 15000)); + fs.readdirSync(getOutputDir()); // Force a file system sync const outputDir = getOutputDir(); + log(`Output directory: ${outputDir}`); + log("Contents of output directory:"); + const files = fs.readdirSync(outputDir); + for (const file of files) { + log(`- ${file}`); + } + + await processResults(); + await uploadArtifacts(outputDir); if (IS_GITHUB_ACTIONS) {