fix: do not error out if ssh config is empty (#1632)

As connections can now be stored in the internal connection, a missing
or invalid ssh config should not cause the entire list of connections to
be empty. This change ignores the error from the ssh config and proceeds
to construct the list without it.
This commit is contained in:
Sylvie Crowe 2024-12-26 22:52:47 -08:00 committed by GitHub
parent 73561dc12d
commit 0c9f35791d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -712,7 +712,8 @@ func GetConnectionsList() ([]string, error) {
fromConfig, err := GetConnectionsFromConfig()
if err != nil {
return nil, err
// this is not a fatal error. do not return
log.Printf("warning: no connections from ssh config found: %v", err)
}
// sort into one final list and remove duplicates