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