Skip to content

Commit 6424a61

Browse files
authored
Use exact dotnet version in EndToEndTests. (#2893)
1 parent e9653fd commit 6424a61

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/Fantomas.Client.Tests/EndToEndTests.fs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,16 @@ type EndToEndTests() =
4040

4141
// This sdk version must match the version used in this repository.
4242
// It will be the version which the CI/CD pipeline has access to.
43-
do! dotnet "new globaljson --sdk-version 7.0.202 --roll-forward latestPatch"
43+
let! dotnetVersionResult =
44+
Cli
45+
.Wrap("dotnet")
46+
.WithWorkingDirectory(__SOURCE_DIRECTORY__)
47+
.WithArguments("--version")
48+
.ExecuteBufferedAsync()
49+
.Task
50+
51+
let dotnetVersion = dotnetVersionResult.StandardOutput.Trim()
52+
do! dotnet $"new globaljson --sdk-version %s{dotnetVersion} --roll-forward latestPatch"
4453
do! dotnet "new tool-manifest"
4554

4655
do!

0 commit comments

Comments
 (0)