Skip to content

Commit

Permalink
Fix: Retrieving dotnet runtimes hangs when there are too many runtime…
Browse files Browse the repository at this point in the history
…s installed (#119)
  • Loading branch information
Booksbaum authored Oct 23, 2021
1 parent 1c9317b commit ce9f379
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/Ionide.ProjInfo/Library.fs
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,18 @@ module SdkDiscovery =
info.ArgumentList.Add arg

info.RedirectStandardOutput <- true
let p = System.Diagnostics.Process.Start(info)
use p = System.Diagnostics.Process.Start(info)

let output =
seq {
while not p.StandardOutput.EndOfStream do
yield p.StandardOutput.ReadLine()
}
|> Seq.toArray

p.WaitForExit()
output

seq {
while not p.StandardOutput.EndOfStream do
yield p.StandardOutput.ReadLine()
}

let private (|SemVer|_|) version =
match SemanticVersioning.Version.TryParse version with
Expand Down

0 comments on commit ce9f379

Please sign in to comment.