From 2411b7d2ccd26d151b715ab743778b822e59760f Mon Sep 17 00:00:00 2001 From: David Michon Date: Wed, 6 Aug 2025 20:42:40 +0000 Subject: [PATCH] [rush-bridge-cache] Fix tap type --- .../rush/bridge-cache-fix-wait_2025-08-06-20-42.json | 10 ++++++++++ .../rush-bridge-cache-plugin/src/BridgeCachePlugin.ts | 8 ++++---- 2 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 common/changes/@microsoft/rush/bridge-cache-fix-wait_2025-08-06-20-42.json diff --git a/common/changes/@microsoft/rush/bridge-cache-fix-wait_2025-08-06-20-42.json b/common/changes/@microsoft/rush/bridge-cache-fix-wait_2025-08-06-20-42.json new file mode 100644 index 00000000000..86651483f89 --- /dev/null +++ b/common/changes/@microsoft/rush/bridge-cache-fix-wait_2025-08-06-20-42.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@microsoft/rush", + "comment": "Fix a bug in \"@rushstack/rush-bridge-cache-plugin\" where the cache replay did not block the normal execution process and instead was a floating promise.", + "type": "none" + } + ], + "packageName": "@microsoft/rush" +} \ No newline at end of file diff --git a/rush-plugins/rush-bridge-cache-plugin/src/BridgeCachePlugin.ts b/rush-plugins/rush-bridge-cache-plugin/src/BridgeCachePlugin.ts index 0f22d3d85b0..fe4501cc69f 100644 --- a/rush-plugins/rush-bridge-cache-plugin/src/BridgeCachePlugin.ts +++ b/rush-plugins/rush-bridge-cache-plugin/src/BridgeCachePlugin.ts @@ -75,7 +75,7 @@ export class BridgeCachePlugin implements IRushPlugin { } ); // populate the cache for each operation - command.hooks.beforeExecuteOperations.tap( + command.hooks.beforeExecuteOperations.tapPromise( PLUGIN_NAME, async ( recordByOperation: Map, @@ -137,9 +137,9 @@ export class BridgeCachePlugin implements IRushPlugin { const projectFolder: string = operation.associatedProject?.projectFolder; const missingFolders: string[] = []; operation.settings.outputFolderNames.forEach((outputFolderName: string) => { - if (!FileSystem.exists(`${projectFolder}/${outputFolderName}`)) { - missingFolders.push(outputFolderName); - } + if (!FileSystem.exists(`${projectFolder}/${outputFolderName}`)) { + missingFolders.push(outputFolderName); + } }); if (missingFolders.length > 0) { terminal.writeWarningLine(