From 1877e27be754d7bade176a69fe023c77dac6b1aa Mon Sep 17 00:00:00 2001 From: Pete Gonzalez <4673363+octogonz@users.noreply.github.com> Date: Thu, 13 May 2021 21:09:55 -0700 Subject: [PATCH 1/2] Fix a build cache warning that was sometimes displayed on Windows OS: "'tar' exited with code 1 while attempting to create the cache entry" (GitHub #2622) --- apps/rush-lib/src/utilities/TarExecutable.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/rush-lib/src/utilities/TarExecutable.ts b/apps/rush-lib/src/utilities/TarExecutable.ts index d1ee93f8475..4748cf8a0b3 100644 --- a/apps/rush-lib/src/utilities/TarExecutable.ts +++ b/apps/rush-lib/src/utilities/TarExecutable.ts @@ -62,6 +62,10 @@ export class TarExecutable { const pathsListFilePath: string = `${project.projectRushTempFolder}/tarPaths_${Date.now()}`; await FileSystem.writeFileAsync(pathsListFilePath, paths.join('\n')); + // On Windows, tar.exe will report a "Failed to clean up compressor" error if the target folder + // does not exist (GitHub #2622) + await FileSystem.ensureFolderAsync(path.dirname(archivePath)); + const projectFolderPath: string = project.projectFolder; const tarExitCode: number = await this._spawnTarWithLoggingAsync( ['-c', '-f', archivePath, '-z', '-C', projectFolderPath, '--files-from', pathsListFilePath], From 739e2b5cf7df2d41721ce49054945954cc7ba103 Mon Sep 17 00:00:00 2001 From: Pete Gonzalez <4673363+octogonz@users.noreply.github.com> Date: Thu, 13 May 2021 21:10:39 -0700 Subject: [PATCH 2/2] rush change --- .../octogonz-rush-issue-2622_2021-05-14-04-10.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 common/changes/@microsoft/rush/octogonz-rush-issue-2622_2021-05-14-04-10.json diff --git a/common/changes/@microsoft/rush/octogonz-rush-issue-2622_2021-05-14-04-10.json b/common/changes/@microsoft/rush/octogonz-rush-issue-2622_2021-05-14-04-10.json new file mode 100644 index 00000000000..a5e3326ac5e --- /dev/null +++ b/common/changes/@microsoft/rush/octogonz-rush-issue-2622_2021-05-14-04-10.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "packageName": "@microsoft/rush", + "comment": "Fix a build cache warning that was sometimes displayed on Windows OS: \"'tar' exited with code 1 while attempting to create the cache entry\" (GitHub #2622)", + "type": "none" + } + ], + "packageName": "@microsoft/rush", + "email": "4673363+octogonz@users.noreply.github.com" +} \ No newline at end of file