Skip to content

Commit

Permalink
Merge pull request #2697 from microsoft/octogonz/rush-issue-2622
Browse files Browse the repository at this point in the history
[rush] Fix build cache warning: "tar" exited with code 1
  • Loading branch information
octogonz authored May 14, 2021
2 parents 9e51c9b + 739e2b5 commit 60d5daf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/rush-lib/src/utilities/TarExecutable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down
Original file line number Diff line number Diff line change
@@ -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": "[email protected]"
}

0 comments on commit 60d5daf

Please sign in to comment.