Skip to content

Commit

Permalink
Fixed ProcessHelper.ensureProcessesHaveStopped (fsprojects#389)
Browse files Browse the repository at this point in the history
  • Loading branch information
palpha committed Apr 25, 2014
1 parent f1c6c89 commit b1e7fef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app/FakeLib/ProcessHelper.fs
Original file line number Diff line number Diff line change
Expand Up @@ -448,12 +448,12 @@ let killAllCreatedProcesses() =
/// ## Parameters
/// - `name` - The name of the processes in question.
/// - `timeout` - The timespan to time out after.
let ensureProcessesHaveStopped name timeout =
let ensureProcessesHaveStopped name timeout =
let endTime = DateTime.Now.Add timeout
while DateTime.Now <= endTime && (getProcessesByName name <> Seq.empty) do
while DateTime.Now <= endTime && not (getProcessesByName name |> Seq.isEmpty) do
tracefn "Waiting for %s to stop (Timeout: %A)" name endTime
Thread.Sleep 1000
if getProcessesByName name <> Seq.empty then
if not (getProcessesByName name |> Seq.isEmpty) then
failwithf "The process %s has not stopped (check the logs for errors)" name

/// Execute an external program and return the exit code.
Expand Down

0 comments on commit b1e7fef

Please sign in to comment.