Skip to content

Commit

Permalink
Fixes #2600.
Browse files Browse the repository at this point in the history
A duplicate item is thrown when calling `withEnvironment` from NUnit. Empty dictionary is causing issues.
  • Loading branch information
yazeedobaid committed Jul 25, 2022
1 parent 7fb7466 commit 3b0da6e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/Fake.Core.Process/RawProc.fs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ module EnvMap =
else IMap.empty

let ofSeq l : EnvMap =
empty.AddRange(l |> Seq.map (fun (k, v) -> KeyValuePair<_,_>(k, v)))
empty
.AddRange(Environment.environVars () |> Seq.map (fun (k, v) -> KeyValuePair<_,_>(k, v)))
.AddRange(l |> Seq.map (fun (k, v) -> KeyValuePair<_,_>(k, v)))

let create() =
ofSeq (Environment.environVars ())
Expand Down

0 comments on commit 3b0da6e

Please sign in to comment.