Use only nixos.org channels if guess

This commit is contained in:
Mikhail Klementev 2020-01-04 11:23:40 +00:00
parent d973179557
commit 40ef3fe50e
No known key found for this signature in database
GPG key ID: BE44DA8C062D87DC

View file

@ -58,8 +58,10 @@ func guessChannel() (channel string, err error) {
for _, line := range channels { for _, line := range channels {
fields := strings.Fields(line) fields := strings.Fields(line)
if len(fields) == 2 { if len(fields) == 2 {
channel = fields[0] if strings.Contains(fields[1], "nixos.org/channels") {
return channel = fields[0]
return
}
} }
} }