Skip to content

Commit

Permalink
Avoid dotnet format hang
Browse files Browse the repository at this point in the history
Attempt to workaround dotnet/sdk#44951
  • Loading branch information
AArnott committed Nov 19, 2024
1 parent 09b4049 commit 1210dc1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
<ItemGroup>
<GlobalPackageReference Include="CSharpIsNullAnalyzer" Version="0.1.593" />
<GlobalPackageReference Include="DotNetAnalyzers.DocumentationAnalyzers" Version="1.0.0-beta.59" />
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.6.146" />
<!-- The condition works around https://github.com/dotnet/sdk/issues/44951 -->
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.6.146" Condition="!('$(TF_BUILD)'=='true' and '$(dotnetformat)'=='true')" />
<GlobalPackageReference Include="Nullable" Version="1.3.1" />
<GlobalPackageReference Include="StyleCop.Analyzers.Unstable" Version="1.2.0.556" />
</ItemGroup>
Expand Down
4 changes: 3 additions & 1 deletion azure-pipelines/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ jobs:
parameters:
RunTests: ${{ parameters.RunTests }}
osRID: linux
- script: dotnet format --verify-no-changes --no-restore
- script: dotnet format --verify-no-changes
displayName: 💅 Verify formatted code
env:
dotnetformat: true
- template: node.yml
- template: collect-artifacts.yml
parameters:
Expand Down

0 comments on commit 1210dc1

Please sign in to comment.