Falls back to null for settings constructor

This commit is contained in:
Phil Scott 2021-04-05 12:12:34 -04:00 committed by Patrik Svensson
parent be45a0ff4e
commit 4edc647fdd

View File

@ -44,6 +44,11 @@ namespace Spectre.Console.Cli
binder.Bind(parameter, resolver, value);
CommandValidator.ValidateParameter(parameter, lookup);
}
else if (Nullable.GetUnderlyingType(parameter.ParameterType) != null ||
!parameter.ParameterType.IsValueType)
{
lookup.SetValue(parameter, null);
}
}
}