Skip to content

Commit 5b5d5c9

Browse files
committed
One further tweak; since env vars now use the KeyValueSettings.Set() path, obsolete setting names should be allowed
1 parent 7f4e543 commit 5b5d5c9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/SeqCli/Config/KeyValueSettings.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public static void Set(SeqCliConfig config, string key, string? value)
3838
for (var i = 0; i < steps.Length - 1; ++i)
3939
{
4040
var nextStep = receiver.GetType().GetTypeInfo().DeclaredProperties
41-
.Where(p => p.CanRead && p.GetMethod!.IsPublic && !p.GetMethod.IsStatic && p.GetCustomAttribute<ObsoleteAttribute>() == null && p.GetCustomAttribute<JsonIgnoreAttribute>() == null)
41+
.Where(p => p.CanRead && p.GetMethod!.IsPublic && !p.GetMethod.IsStatic && p.GetCustomAttribute<JsonIgnoreAttribute>() == null)
4242
.SingleOrDefault(p => Camelize(GetUserFacingName(p)) == steps[i]);
4343

4444
if (nextStep == null)
@@ -56,8 +56,7 @@ public static void Set(SeqCliConfig config, string key, string? value)
5656
// intercept writes through hidden properties, triggering encoding where supported. A type-based solution
5757
// would be more robust.
5858
var targetProperty = receiver.GetType().GetTypeInfo().DeclaredProperties
59-
.Where(p => p is { CanRead: true, CanWrite: true } && p.GetMethod!.IsPublic && p.SetMethod!.IsPublic &&
60-
!p.GetMethod.IsStatic && p.GetCustomAttribute<ObsoleteAttribute>() == null)
59+
.Where(p => p is { CanRead: true, CanWrite: true } && p.GetMethod!.IsPublic && p.SetMethod!.IsPublic && !p.GetMethod.IsStatic)
6160
.SingleOrDefault(p => Camelize(p.Name) == steps[^1]);
6261

6362
if (targetProperty == null)

0 commit comments

Comments
 (0)