diff --git a/dist/index.js b/dist/index.js index 93f90e2..9c9bf8e 100644 --- a/dist/index.js +++ b/dist/index.js @@ -16988,11 +16988,13 @@ async function getJsonReports(xmlPaths, debugMode) { const paths = xmlPaths.map((xmlPath) => globSync(xmlPath)) if (debugMode) core.info(`paths: ${paths}`) return Promise.all( - paths.map(async (path) => { - if (debugMode) core.info(`path: ${path}`) - const reportXml = await fs.promises.readFile(path.trim(), 'utf-8') - return await parser.parseStringPromise(reportXml) - }) + paths + .filter((path) => path && path.length !== 0) + .map(async (path) => { + if (debugMode) core.info(`path: ${path}`) + const reportXml = await fs.promises.readFile(path.trim(), 'utf-8') + return await parser.parseStringPromise(reportXml) + }) ) } diff --git a/src/action.js b/src/action.js index b9f800e..d0b50a0 100644 --- a/src/action.js +++ b/src/action.js @@ -110,11 +110,13 @@ async function getJsonReports(xmlPaths, debugMode) { const paths = xmlPaths.map((xmlPath) => globSync(xmlPath)) if (debugMode) core.info(`paths: ${paths}`) return Promise.all( - paths.map(async (path) => { - if (debugMode) core.info(`path: ${path}`) - const reportXml = await fs.promises.readFile(path.trim(), 'utf-8') - return await parser.parseStringPromise(reportXml) - }) + paths + .filter((path) => path && path.length !== 0) + .map(async (path) => { + if (debugMode) core.info(`path: ${path}`) + const reportXml = await fs.promises.readFile(path.trim(), 'utf-8') + return await parser.parseStringPromise(reportXml) + }) ) }