Skip to content

Commit a2c34bb

Browse files
authored
Merge pull request #24971 from dotnet/marcpopMSFT-allowtarchanges
Allow file changes from tar as it's just a warning
2 parents d081b93 + fa9625d commit a2c34bb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Tests/HelixTasks/TarGzFileCreateFromDirectory.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@ public sealed class TarGzFileCreateFromDirectory : ToolTask
4343
protected override int ExecuteTool(string pathToTool, string responseFileCommands, string commandLineCommands)
4444
{
4545
int returnCode = base.ExecuteTool(pathToTool, responseFileCommands, commandLineCommands);
46-
47-
if (IgnoreExitCode)
46+
47+
// returnCode 1 indicates that files changed during tar. In our case, it is likely being overwritten by another copy of the same file, so we can safely ignore this warning.
48+
if (IgnoreExitCode || returnCode == 1)
4849
{
4950
returnCode = 0;
5051
}

0 commit comments

Comments
 (0)