fix(cli): exclude node_modules in artifacts command (#1875)

This commit is contained in:
LongYinan 2023-12-30 00:00:28 +08:00 committed by GitHub
commit f62685e836
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -90,7 +90,9 @@ async function collectNodeBinaries(root: string) {
const dirs = files.filter((file) => file.isDirectory()) const dirs = files.filter((file) => file.isDirectory())
for (const dir of dirs) { 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 return nodeBinaries
} }