mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-16 06:17:10 +01:00
Fix regex parsing in artifact-provider
This commit is contained in:
parent
075144b122
commit
064a15c405
3 changed files with 9 additions and 3 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue