Skip to content

Commit

Permalink
Use preferred API
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveGilham committed Nov 19, 2022
1 parent 623224f commit b4b8e0f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
7 changes: 2 additions & 5 deletions Fake/Build/targets.fs
Original file line number Diff line number Diff line change
Expand Up @@ -341,16 +341,13 @@ module Targets =
// NOTE: Recommendation is to not use this Field, but instead use the helper function in the Proc module
{ o with Environment = o.Environment |> Map.add "AltCoverTag" (tag + "_") }

let withEnvironment l (o: DotNet.Options) =
let withTestEnvironment l (o: DotNet.TestOptions) =
let before = o.Environment |> Map.toList

let after =
[ l; before ] |> List.concat |> Map.ofList

{ o with Environment = after }

let withTestEnvironment l (o: DotNet.TestOptions) =
{ o with Common = withEnvironment l o.Common }
o.WithEnvironment after

let withAltCoverOptions
(prepare: Abstract.IPrepareOptions)
Expand Down
7 changes: 2 additions & 5 deletions Fake/DriveApi/DriveApi.fs
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,13 @@ module DriveApi =

let dotnetVersion = DotNet.getVersion id

let withEnvironment l (o: DotNet.Options) =
let withTestEnvironment l (o: DotNet.TestOptions) =
let before = o.Environment |> Map.toList

let after =
[ l; before ] |> List.concat |> Map.ofList

{ o with Environment = after }

let withTestEnvironment l (o: DotNet.TestOptions) =
{ o with Common = withEnvironment l o.Common }
o.WithEnvironment after

let withAltCoverOptions prepare collect force (o: DotNet.TestOptions) =
if dotnetVersion <> "7.0.100" then
Expand Down

0 comments on commit b4b8e0f

Please sign in to comment.