mirror of
https://github.com/gradle/actions
synced 2024-11-23 18:02:13 +00:00
Do not fail wrapper-validation on filename with illegal characters
This commit is contained in:
parent
473878a77f
commit
48353a25ca
1 changed files with 8 additions and 3 deletions
|
@ -18,9 +18,14 @@ async function recursivelyListFiles(baseDir: string): Promise<string[]> {
|
||||||
const childrenPaths = await Promise.all(
|
const childrenPaths = await Promise.all(
|
||||||
childrenNames.map(async childName => {
|
childrenNames.map(async childName => {
|
||||||
const childPath = path.resolve(baseDir, childName)
|
const childPath = path.resolve(baseDir, childName)
|
||||||
return fs.lstatSync(childPath).isDirectory()
|
const stat = fs.lstatSync(childPath, {throwIfNoEntry: false})
|
||||||
? recursivelyListFiles(childPath)
|
if (stat === undefined) {
|
||||||
: new Promise(resolve => resolve([childPath]))
|
return []
|
||||||
|
} else if (stat.isDirectory()) {
|
||||||
|
return recursivelyListFiles(childPath)
|
||||||
|
} else {
|
||||||
|
return new Promise(resolve => resolve([childPath]))
|
||||||
|
}
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
return Array.prototype.concat(...childrenPaths)
|
return Array.prototype.concat(...childrenPaths)
|
||||||
|
|
Loading…
Reference in a new issue