Skip to content

Commit a231eef

Browse files
committed
fix: Allow multiple files to be read
1 parent 973caca commit a231eef

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/index.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,15 @@ async function main(args) {
119119
)
120120
}
121121
} else {
122-
coverageFilePaths[0] = validateHelpers.validateFileNamePath(args.file)
123-
? args.file
124-
: ''
122+
if (typeof(args.file) === 'object') {
123+
for (const file of args.file) {
124+
coverageFilePaths.push(validateHelpers.validateFileNamePath(file) ? file : '')
125+
}
126+
} else {
127+
coverageFilePaths[0] = validateHelpers.validateFileNamePath(args.file)
128+
? args.file
129+
: ''
130+
}
125131
if (coverageFilePaths.length === 0) {
126132
throw new Error('Not coverage file found, exiting.')
127133
}

0 commit comments

Comments
 (0)