Expected Behavior
Should also support single worded PRETTY_NAME="Chainguard" in /etc/os-release. As per this the pretty name may or may not contain a release code name or OS version.
Current Behavior
Currently it only supports if there are multiple words in PRETTY_NAME=Debian GNU/LINUX 12"
Failure Information
System.ArgumentOutOfRangeException because it's not able to find space in OS description here
Vault 1.16.1
Vault C# Client 0.3.0
Steps to Reproduce
- Update PRETTY_NAME in /etc/os-release to a single worded name (found this issue when I used a dotnet chainguard image where the pretty name is just one word
Chainguard)
- call VaultConfiguration()
Additional Information
Unhandled exception. System.ArgumentOutOfRangeException: length ('-1') must be a non-negative value. (Parameter 'length')
Actual value was -1.
at System.ArgumentOutOfRangeException.ThrowNegative[T](T value, String paramName)
at System.ArgumentOutOfRangeException.ThrowIfNegative[T](T value, String paramName)
at System.String.ThrowSubstringArgumentOutOfRange(Int32 startIndex, Int32 length)
at System.String.Substring(Int32 startIndex, Int32 length)
at Vault.Client.VaultConfiguration.BuildUserAgent()
at Vault.Client.VaultConfiguration..ctor(String basePath, HttpClientHandler httpClientHandler, Nullable`1 timeout, RetryConfiguration retryConfiguration, RateLimitConfiguration rateLimitConfiguration, TLSConfiguration tlsConfiguration)
at VaultAdapter..ctor(IOptions`1 options)
Expected Behavior
Should also support single worded
PRETTY_NAME="Chainguard"in/etc/os-release. As per this the pretty name may or may not contain a release code name or OS version.Current Behavior
Currently it only supports if there are multiple words in
PRETTY_NAME=Debian GNU/LINUX 12"Failure Information
System.ArgumentOutOfRangeExceptionbecause it's not able to find space in OS description hereVault 1.16.1
Vault C# Client 0.3.0
Steps to Reproduce
Chainguard)Additional Information