Skip to content

Commit 76913a6

Browse files
committed
correct condition
1 parent d469476 commit 76913a6

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

build/Program.fs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ let init args =
3838
| true, v -> v
3939
| _ -> false
4040

41-
let ignoreTest =
42-
match System.Environment.GetEnvironmentVariable("IgnoreTest") |> bool.TryParse with
41+
let ignoreTests =
42+
match System.Environment.GetEnvironmentVariable("IgnoreTests") |> bool.TryParse with
4343
| true, v -> v
4444
| _ -> false
4545

@@ -58,11 +58,8 @@ let init args =
5858
Target.create "Test:net6.0" (fun _ -> testTFM "net6.0")
5959
Target.create "Test:net7.0" (fun _ -> testTFM "net7.0")
6060

61-
if not ignoreTest then
62-
"Build" ?=> "Test:net6.0" =?> ("Test", not buildNet7) |> ignore
63-
64-
if not ignoreTest then
65-
"Build" ?=> "Test:net7.0" =?> ("Test", buildNet7) |> ignore
61+
"Build" =?> ("Test:net6.0", not buildNet7) =?> ("Test", not ignoreTests) |> ignore
62+
"Build" =?> ("Test:net7.0", buildNet7) =?> ("Test", not ignoreTests) |> ignore
6663

6764
Target.create "ListPackages" (fun _ -> packages () |> Seq.iter (fun pkg -> printfn $"Found package at: {pkg}"))
6865

@@ -116,6 +113,7 @@ let main args =
116113
| _ -> Target.runOrDefaultWithArguments "Default"
117114

118115
0
119-
with e ->
116+
with
117+
| e ->
120118
printfn "%A" e
121119
1

0 commit comments

Comments
 (0)