mirror of
https://github.com/dorny/test-reporter.git
synced 2026-02-01 02:45:22 -08:00
Fix regex parsing in artifact-provider
This commit is contained in:
@@ -22,7 +22,10 @@ export class ArtifactProvider implements InputProvider {
|
||||
readonly runId: number
|
||||
) {
|
||||
if (this.artifact.startsWith('/')) {
|
||||
const re = new RegExp(this.artifact)
|
||||
const endIndex = this.artifact.lastIndexOf('/')
|
||||
const rePattern = this.artifact.substring(1, endIndex)
|
||||
const reOpts = this.artifact.substring(endIndex + 1)
|
||||
const re = new RegExp(rePattern, reOpts)
|
||||
this.artifactNameMatch = (str: string) => re.test(str)
|
||||
this.getReportName = (str: string) => {
|
||||
const match = str.match(re)
|
||||
|
||||
Reference in New Issue
Block a user