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(