From 67743b10466a49c0bac145d38e904cb89118fb9f Mon Sep 17 00:00:00 2001 From: LongYinan Date: Fri, 29 Dec 2023 21:30:36 +0800 Subject: [PATCH] fix(cli): exclude node_modules in artifacts command --- cli/src/api/artifacts.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cli/src/api/artifacts.ts b/cli/src/api/artifacts.ts index c6d192b8..a0378947 100644 --- a/cli/src/api/artifacts.ts +++ b/cli/src/api/artifacts.ts @@ -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 }