From 733854720db99d0eab4dd07c974567d346b73eae Mon Sep 17 00:00:00 2001 From: Miki Date: Wed, 19 Oct 2022 16:52:58 -0700 Subject: [PATCH] [Windows:Build] Enhances the cleanup of node Signed-off-by: Miki --- src/dev/build/tasks/nodejs/clean_node_builds_task.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/dev/build/tasks/nodejs/clean_node_builds_task.ts b/src/dev/build/tasks/nodejs/clean_node_builds_task.ts index 490d71e6d70d..938f7f43f692 100644 --- a/src/dev/build/tasks/nodejs/clean_node_builds_task.ts +++ b/src/dev/build/tasks/nodejs/clean_node_builds_task.ts @@ -28,7 +28,7 @@ * under the License. */ -import { deleteAll, Task } from '../../lib'; +import { deleteAll, normalizePath, Task } from '../../lib'; export const CleanNodeBuilds: Task = { description: 'Cleaning npm from node', @@ -37,9 +37,11 @@ export const CleanNodeBuilds: Task = { for (const platform of config.getTargetPlatforms()) { await deleteAll( [ - build.resolvePathForPlatform(platform, 'node/lib/node_modules'), - build.resolvePathForPlatform(platform, 'node/bin/npm'), - build.resolvePathForPlatform(platform, 'node/bin/npx'), + normalizePath(build.resolvePathForPlatform(platform, 'node/**/node_modules')), + normalizePath(build.resolvePathForPlatform(platform, 'node/**/npm*')), + normalizePath(build.resolvePathForPlatform(platform, 'node/**/npx*')), + normalizePath(build.resolvePathForPlatform(platform, 'node/**/corepack*')), + normalizePath(build.resolvePathForPlatform(platform, 'node/**/nodevars*')), ], log );