fix(cli): exclude node_modules in artifacts command

This commit is contained in:
LongYinan 2023-12-29 21:30:36 +08:00
parent 43a080d52b
commit 67743b1046
No known key found for this signature in database
GPG key ID: 30B1140CE1C07C99

View file

@ -90,7 +90,9 @@ async function collectNodeBinaries(root: string) {
const dirs = files.filter((file) => file.isDirectory())
for (const dir of dirs) {
nodeBinaries.push(...(await collectNodeBinaries(join(root, dir.name))))
if (dir.name !== 'node_modules') {
nodeBinaries.push(...(await collectNodeBinaries(join(root, dir.name))))
}
}
return nodeBinaries
}