Skip to content

Commit

Permalink
Replacing globSync with glob
Browse files Browse the repository at this point in the history
  • Loading branch information
thsaravana committed Jul 24, 2023
1 parent faa89e8 commit eada1b7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16884,7 +16884,7 @@ const { parseBooleans } = __nccwpck_require__(6434)
const process = __nccwpck_require__(650)
const render = __nccwpck_require__(8183)
const { debug } = __nccwpck_require__(4518)
const { globSync } = __nccwpck_require__(1144)
const { glob } = __nccwpck_require__(1144)

async function action() {
try {
Expand Down Expand Up @@ -16985,13 +16985,13 @@ async function action() {

async function getJsonReports(xmlPaths, debugMode) {
if (debugMode) core.info(`xmlPaths: ${xmlPaths} : ${xmlPaths.length}`)
const paths = globSync(xmlPaths)
const paths = await glob(xmlPaths)
if (debugMode)
core.info(`paths: ${paths} : ${typeof paths} : ${paths.length}`)
xmlPaths.forEach((p) => {
const ph = globSync(p)
for (const p of xmlPaths) {
const ph = await glob(p)
if (debugMode) core.info(`ph: ${ph} : ${typeof ph} : ${ph.length}`)
})
}
return Promise.all(
paths
.filter((path) => path && path.length !== 0)
Expand Down
10 changes: 5 additions & 5 deletions src/action.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const { parseBooleans } = require('xml2js/lib/processors')
const process = require('./process')
const render = require('./render')
const { debug } = require('./util')
const { globSync } = require('glob')
const { glob } = require('glob')

async function action() {
try {
Expand Down Expand Up @@ -107,13 +107,13 @@ async function action() {

async function getJsonReports(xmlPaths, debugMode) {
if (debugMode) core.info(`xmlPaths: ${xmlPaths} : ${xmlPaths.length}`)
const paths = globSync(xmlPaths)
const paths = await glob(xmlPaths)
if (debugMode)
core.info(`paths: ${paths} : ${typeof paths} : ${paths.length}`)
xmlPaths.forEach((p) => {
const ph = globSync(p)
for (const p of xmlPaths) {
const ph = await glob(p)
if (debugMode) core.info(`ph: ${ph} : ${typeof ph} : ${ph.length}`)
})
}
return Promise.all(
paths
.filter((path) => path && path.length !== 0)
Expand Down

0 comments on commit eada1b7

Please sign in to comment.