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

@@ -33,7 +33,9 @@ class FileArtifactGlobber {
this.globber = globber;
}
globArtifactString(artifact, contentType, errorsFailBuild) {
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]))