Skip to content

Commit da9ae70

Browse files
committed
Ensure settings args are passed seperately e.g [-E, setting=value] vs [-E setting=value]
1 parent 80e74c0 commit da9ae70

File tree

5 files changed

+9
-13
lines changed

5 files changed

+9
-13
lines changed

build/scripts/scripts.fsproj

+1-1
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.9.0" />
11+
<PackageReference Include="Proc" Version="0.9.1" />
1212
<PackageReference Include="Fake.Tools.Git" Version="5.15.0" />
1313
</ItemGroup>
1414

examples/ScratchPad/ScratchPad.csproj

+1-1
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.9.0" />
8+
<PackageReference Include="Proc" Version="0.9.1" />
99
<!--<ProjectReference Include="..\..\..\..\..\proc\src\Proc\Proc.csproj" />-->
1010
<PackageReference Include="NEST" Version="6.0.1" />
1111
</ItemGroup>

src/Elastic.Elasticsearch.Ephemeral/Elastic.Elasticsearch.Ephemeral.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0;net462</TargetFrameworks>
4+
<TargetFrameworks>netstandard2.0;netstandard2.1;net462</TargetFrameworks>
55
<Description>Provides an EphemeralCluster implementation that can download/bootstrap/run a throwaway customizable Elasticsearch cluster</Description>
66
<PackageTags>elastic,elasticsearch,cluster,ephemeral</PackageTags>
77
</PropertyGroup>

src/Elastic.Elasticsearch.Managed/Configuration/NodeSettings.cs

+4-6
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ namespace Elastic.Elasticsearch.Managed.Configuration
1111
{
1212
public class NodeSettings : List<NodeSetting>
1313
{
14-
private static readonly ElasticVersion
15-
LastVersionWithoutPrefixForSettings = ElasticVersion.From("5.0.0-alpha2");
16-
1714
public NodeSettings()
1815
{
1916
}
@@ -37,8 +34,7 @@ public void Add(string key, string value, string versionRange) =>
3734

3835
public string[] ToCommandLineArguments(ElasticVersion version)
3936
{
40-
var settingsPrefix = version > LastVersionWithoutPrefixForSettings ? "" : "es.";
41-
var settingArgument = version.Major >= 5 ? "-E " : "-D";
37+
var settingArgument = "-E";
4238
return this
4339
//if a node setting is only applicable for a certain version make sure its filtered out
4440
.Where(s => string.IsNullOrEmpty(s.VersionRange) || version.InRange(s.VersionRange))
@@ -47,7 +43,9 @@ public string[] ToCommandLineArguments(ElasticVersion version)
4743
//on the command with the latter taking precedence
4844
.GroupBy(setting => setting.Key)
4945
.Select(g => g.Last())
50-
.Select(s => s.Key.StartsWith(settingArgument) ? s.ToString() : $"{settingArgument}{settingsPrefix}{s}")
46+
.SelectMany<NodeSetting, string>(
47+
s => [settingArgument, $"{s}"]
48+
)
5149
.ToArray();
5250
}
5351
}
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0;net462</TargetFrameworks>
4+
<TargetFrameworks>netstandard2.0;netstandard2.1;net462</TargetFrameworks>
55
<Description>
66
Provides an observable ElasticsearchNode abstraction that can be used to wrap an elasticsearch process.
77
Also ships with an cluster abstraction that can start one or more ElasticsearchNode's
88
</Description>
99
<PackageTags>elastic,elasticsearch,cluster,observable,rx</PackageTags>
1010
</PropertyGroup>
11-
<ItemGroup>
12-
<PackageReference Include="Proc" Version="0.9.0" />
13-
</ItemGroup>
1411
<ItemGroup>
1512
<ProjectReference Include="..\Elastic.Stack.ArtifactsApi\Elastic.Stack.ArtifactsApi.csproj" />
13+
<PackageReference Include="Proc" Version="0.9.1" />
1614
</ItemGroup>
1715
</Project>

0 commit comments

Comments
 (0)