From 8e8c5c9cc35ef9b3de9b8d43919f27a39a1d75d3 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 20 May 2024 23:31:29 +0200 Subject: refactor: make repository URLs by Repo.Type (currently no change) "currently no change" because only GitHub repos are supported, but more ready to support other types --- internal/importer/package.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'internal/importer/package.go') diff --git a/internal/importer/package.go b/internal/importer/package.go index 5e9ad26..3fee8d7 100644 --- a/internal/importer/package.go +++ b/internal/importer/package.go @@ -225,6 +225,10 @@ func (i *PackageIngester) Process(parent context.Context) (<-chan nix.Importable pkgSet = "" } + url, err := makeRepoURL(i.source.Repo, subpath, line) + if err != nil { + errs <- err + } results <- &nix.Package{ Name: i.pkg.Name, Attribute: kv.Key, @@ -239,7 +243,7 @@ func (i *PackageIngester) Process(parent context.Context) (<-chan nix.Importable Platforms: i.pkg.Meta.Platforms, Licenses: licenses, Maintainers: maintainers, - Definition: makeRepoURL(i.source.Repo, subpath, line), + Definition: url, } } }() -- cgit 1.4.1