Skip to content

Commit 4e75ce9

Browse files
committed
Update Proc package and simplify binary execution logic
Upgraded Proc package references from various older versions to 0.8.2 across multiple projects for consistency. Removed redundant overloaded method in `IClusterComposeTask.cs` to streamline the binary execution logic.
1 parent 34d6e3d commit 4e75ce9

File tree

4 files changed

+6
-12
lines changed

4 files changed

+6
-12
lines changed

build/scripts/scripts.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<ItemGroup>
99
<PackageReference Include="Argu" Version="6.0.0" />
1010
<PackageReference Include="Bullseye" Version="3.3.0" />
11-
<PackageReference Include="Proc" Version="0.6.2" />
11+
<PackageReference Include="Proc" Version="0.8.2" />
1212
<PackageReference Include="Fake.Tools.Git" Version="5.15.0" />
1313
</ItemGroup>
1414

examples/ScratchPad/ScratchPad.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<IsPackable>False</IsPackable>
66
</PropertyGroup>
77
<ItemGroup>
8-
<PackageReference Include="Proc" Version="0.6.1" />
8+
<PackageReference Include="Proc" Version="0.8.2" />
99
<!--<ProjectReference Include="..\..\..\..\..\proc\src\Proc\Proc.csproj" />-->
1010
<PackageReference Include="NEST" Version="6.0.1" />
1111
</ItemGroup>

src/Elastic.Elasticsearch.Ephemeral/Tasks/IClusterComposeTask.cs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -148,14 +148,10 @@ protected static void WriteFileIfNotExist(string fileLocation, string contents)
148148

149149
protected static void ExecuteBinary(EphemeralClusterConfiguration config, IConsoleLineHandler writer,
150150
string binary, string description, params string[] arguments) =>
151-
ExecuteBinaryInternal(config, writer, binary, description, null, arguments);
152-
153-
protected static void ExecuteBinary(EphemeralClusterConfiguration config, IConsoleLineHandler writer,
154-
string binary, string description, StartedHandler startedHandler, params string[] arguments) =>
155-
ExecuteBinaryInternal(config, writer, binary, description, startedHandler, arguments);
151+
ExecuteBinaryInternal(config, writer, binary, description, arguments);
156152

157153
private static void ExecuteBinaryInternal(EphemeralClusterConfiguration config, IConsoleLineHandler writer,
158-
string binary, string description, StartedHandler startedHandler, params string[] arguments)
154+
string binary, string description, params string[] arguments)
159155
{
160156
var command = $"{{{binary}}} {{{string.Join(" ", arguments)}}}";
161157
writer?.WriteDiagnostic($"{{{nameof(ExecuteBinary)}}} starting process [{description}] {command}");
@@ -170,9 +166,7 @@ private static void ExecuteBinaryInternal(EphemeralClusterConfiguration config,
170166
}
171167
};
172168

173-
var result = startedHandler != null
174-
? Proc.Start(processStartArguments, timeout, new ConsoleOutColorWriter(), startedHandler)
175-
: Proc.Start(processStartArguments, timeout, new ConsoleOutColorWriter());
169+
var result = Proc.Start(processStartArguments, timeout, new ConsoleOutColorWriter());
176170

177171
if (!result.Completed)
178172
throw new Exception($"Timeout while executing {description} exceeded {timeout}");

src/Elastic.Elasticsearch.Managed/Elastic.Elasticsearch.Managed.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<PackageTags>elastic,elasticsearch,cluster,observable,rx</PackageTags>
1010
</PropertyGroup>
1111
<ItemGroup>
12-
<PackageReference Include="Proc" Version="0.6.1" />
12+
<PackageReference Include="Proc" Version="0.8.2" />
1313
</ItemGroup>
1414
<ItemGroup>
1515
<ProjectReference Include="..\Elastic.Stack.ArtifactsApi\Elastic.Stack.ArtifactsApi.csproj" />

0 commit comments

Comments
 (0)