Skip to content

Commit 1b67c37

Browse files
authored
Run MoveDotNetBuildLogs target even when the repo build fails (#44480)
1 parent 99ee9c6 commit 1b67c37

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/SourceBuild/content/repo-projects/Directory.Build.targets

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -489,14 +489,14 @@
489489
<Output TaskParameter="TouchedFiles" ItemName="FileWrites" />
490490
</Touch>
491491

492-
<!-- Propagate errors to the output when using the minimal console log feature. -->
493-
<OnError ExecuteTargets="LogRepoBuildError" Condition="'$(MinimalConsoleLogOutput)' == 'true'" />
492+
<OnError ExecuteTargets="MoveDotNetBuildLogs;LogRepoBuildError" />
494493
</Target>
495494

496-
<Target Name="LogRepoBuildError">
497-
<Message Importance="High" Text="$([System.IO.File]::ReadAllText('$(RepoConsoleLogFile)'))" Condition="Exists('$(RepoConsoleLogFile)') and '$(MinimalConsoleLogOutput)' == 'true'" />
495+
<!-- Propagate errors to the output when using the minimal console log feature. -->
496+
<Target Name="LogRepoBuildError" Condition="'$(MinimalConsoleLogOutput)' == 'true'">
497+
<Message Importance="High" Text="$([System.IO.File]::ReadAllText('$(RepoConsoleLogFile)'))" Condition="Exists('$(RepoConsoleLogFile)')" />
498498
<Message Importance="High" Text="'$(RepositoryName)' failed during build." />
499-
<Message Importance="High" Text="See '$(RepoConsoleLogFile)' for more information." Condition="Exists('$(RepoConsoleLogFile)') and '$(MinimalConsoleLogOutput)' == 'true'" />
499+
<Message Importance="High" Text="See '$(RepoConsoleLogFile)' for more information." Condition="Exists('$(RepoConsoleLogFile)')" />
500500
</Target>
501501

502502
<!-- Log the new repo artifacts -->

0 commit comments

Comments
 (0)