diff --git a/src/Paket.PowerShell/PowerShell.fs b/src/Paket.PowerShell/PowerShell.fs index cdb071afc5..ea28084fef 100644 --- a/src/Paket.PowerShell/PowerShell.fs +++ b/src/Paket.PowerShell/PowerShell.fs @@ -13,7 +13,7 @@ module PaketPs = let processWithLogging (cmdlet:PSCmdlet) computation = Environment.CurrentDirectory <- cmdlet.SessionState.Path.CurrentFileSystemLocation.Path Logging.verbose <- cmdlet.Verbose - let sink = new EventSink() + use sink = new EventSink() Logging.event.Publish |> sink.Fill (fun trace -> match trace.Level with