Skip to content

Commit

Permalink
Bump Proc from 0.8.2 to 0.9.1 (#870)
Browse files Browse the repository at this point in the history
* Bump Proc from 0.8.2 to 0.9.1

Bumps [Proc](https://github.com/nullean/proc) from 0.8.2 to 0.9.1.
- [Release notes](https://github.com/nullean/proc/releases)
- [Commits](nullean/proc@0.8.2...0.9.1)

---
updated-dependencies:
- dependency-name: Proc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Update changelog

Signed-off-by: dependabot[bot] <[email protected]>

* Fix compiling

Signed-off-by: Thomas Farr <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Thomas Farr <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Co-authored-by: Thomas Farr <[email protected]>
  • Loading branch information
3 people authored Dec 24, 2024
1 parent d0abd92 commit 90afb30
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Bumps `Fake.IO.Zip` from 6.1.0 to 6.1.3
- Bumps `Fake.Tools.Git` from 6.1.0 to 6.1.3
- Bumps `CSharpier.Core` from 0.29.1 to 0.30.3
- Bumps `Proc` from 0.8.1 to 0.8.2
- Bumps `Proc` from 0.8.1 to 0.9.1
- Bumps `System.Text.Json` from 8.0.4 to 8.0.5
- Bumps `JunitXml.TestLogger` from 4.0.254 to 4.1.0
- Bumps `FSharp.Core` from 8.0.400 to 8.0.401
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,12 @@ private static void ExecuteBinaryInternal(EphemeralClusterConfiguration config,
var timeout = TimeSpan.FromSeconds(420);
var processStartArguments = new StartArguments(binary, arguments)
{
Environment = environment
Environment = environment,
Timeout = timeout,
ConsoleOutWriter = new ConsoleOutWriter()
};

var result = Proc.Start(processStartArguments, timeout, new ConsoleOutColorWriter());
var result = Proc.Start(processStartArguments);

if (!result.Completed)
throw new Exception($"Timeout while executing {description} exceeded {timeout}");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

</PropertyGroup>
<ItemGroup>
<PackageReference Include="Proc" Version="0.8.2" />
<PackageReference Include="Proc" Version="0.9.1" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
</ItemGroup>
<ItemGroup>
Expand Down
15 changes: 9 additions & 6 deletions build/scripts/Tooling.fs
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,13 @@ module Tooling =

let private defaultConsoleWriter = Some <| (ConsoleOutColorWriter() :> IConsoleOutWriter)

let readInWithTimeout timeout workinDir bin (writer: IConsoleOutWriter option) args =
let readInWithTimeout (timeout: TimeSpan) workinDir bin (writer: IConsoleOutWriter option) args =
let startArgs = StartArguments(bin, args |> List.toArray)
if (Option.isSome workinDir) then
startArgs.WorkingDirectory <- Option.defaultValue "" workinDir
let result = Proc.Start(startArgs, timeout, Option.defaultValue<IConsoleOutWriter> (NoopWriter()) writer)
startArgs.Timeout <- timeout
startArgs.ConsoleOutWriter <- Option.defaultValue<IConsoleOutWriter> (NoopWriter()) writer
let result = Proc.Start(startArgs)

if not result.Completed then failwithf "process failed to complete within %O: %s" timeout bin
if not result.ExitCode.HasValue then failwithf "process yielded no exit code: %s" bin
Expand All @@ -57,16 +59,17 @@ module Tooling =
let read bin args = readInWithTimeout defaultTimeout None bin defaultConsoleWriter args
let readQuiet bin args = readInWithTimeout defaultTimeout None bin None args

let execInWithTimeout timeout workinDir bin args =
let execInWithTimeout (timeout: TimeSpan) workinDir bin args =
let startArgs = ExecArguments(bin, args |> List.toArray)
if (Option.isSome workinDir) then
startArgs.WorkingDirectory <- Option.defaultValue "" workinDir
startArgs.Timeout <- timeout
let options = args |> String.concat " "
printfn ":: Running command: %s %s" bin options
let result = Proc.Exec(startArgs, timeout)
try
if not result.HasValue || result.Value > 0 then
failwithf "process returned %i: %s" result.Value bin
let result = Proc.Exec(startArgs)
if result > 0 then
failwithf "process returned %i: %s" result bin
with
| :? ProcExecException as ex -> failwithf "%s" ex.Message

Expand Down
2 changes: 1 addition & 1 deletion build/scripts/scripts.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />

<PackageReference Include="Octokit" Version="13.0.1" />
<PackageReference Include="Proc" Version="0.8.2" />
<PackageReference Include="Proc" Version="0.9.1" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion tests/Tests.Core/Tests.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
<PackageReference Include="FluentAssertions" Version="7.0.0" />

<PackageReference Include="DiffPlex" Version="1.7.2" />
<PackageReference Include="Proc" Version="0.8.2" />
<PackageReference Include="Proc" Version="0.9.1" />
</ItemGroup>
</Project>

0 comments on commit 90afb30

Please sign in to comment.