From 40ef3fe50ecaa6f0f2f0e44f33a6250eaf29c209 Mon Sep 17 00:00:00 2001 From: Mikhail Klementev Date: Sat, 4 Jan 2020 11:23:40 +0000 Subject: [PATCH] Use only nixos.org channels if guess --- generate.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/generate.go b/generate.go index 50e6d7c..3eae4b7 100644 --- a/generate.go +++ b/generate.go @@ -58,8 +58,10 @@ func guessChannel() (channel string, err error) { for _, line := range channels { fields := strings.Fields(line) if len(fields) == 2 { - channel = fields[0] - return + if strings.Contains(fields[1], "nixos.org/channels") { + channel = fields[0] + return + } } }