fix: case-insensitive hostname check (#10130)

This commit is contained in:
Hiroaki Ogasawara 2025-01-01 09:08:20 +09:00 committed by GitHub
parent 1e44d8c525
commit d0dd09ad88
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -272,7 +272,7 @@ function convertToSSHProfiles (config: SSHConfig): PartialProfile<SSHProfile>[]
if (!(host in myMap)) {
// NOTE: SSHConfig.compute() lies about the return types
const configuration: Record<string, string | string[] | object[]> = config.compute(host)
if (configuration['HostName']) {
if (Object.keys(configuration).map(key => key.toLowerCase()).includes('hostname')) {
myMap[host] = convertHostToSSHProfile(host, configuration)
}
}