Fixes #136 Globber now also supports new line as separator.

This commit is contained in:
Nick Cipollo
2021-10-25 08:03:03 -04:00
parent 15ede536e2
commit 01e1051edf
3 changed files with 22 additions and 3 deletions

View File

@@ -16,7 +16,9 @@ export class FileArtifactGlobber implements ArtifactGlobber {
}
globArtifactString(artifact: string, contentType: string, errorsFailBuild: boolean): Artifact[] {
return artifact.split(',')
const split = /[,\n]/
return artifact.split(split)
.map(path => path.trimStart())
.map(path => FileArtifactGlobber.expandPath(path))
.map(pattern => this.globPattern(pattern, errorsFailBuild))
.map((globResult) => FileArtifactGlobber.validatePattern(errorsFailBuild, globResult[1], globResult[0]))