about summary refs log tree commit diff stats
path: root/internal/fetcher
diff options
context:
space:
mode:
Diffstat (limited to 'internal/fetcher')
-rw-r--r--internal/fetcher/channel.go2
-rw-r--r--internal/fetcher/download.go2
-rw-r--r--internal/fetcher/nixpkgs-channel.go2
3 files changed, 3 insertions, 3 deletions
diff --git a/internal/fetcher/channel.go b/internal/fetcher/channel.go
index cadbab2..5dc84b4 100644
--- a/internal/fetcher/channel.go
+++ b/internal/fetcher/channel.go
@@ -25,7 +25,7 @@ type ChannelFetcher struct {
 func (i *ChannelFetcher) FetchIfNeeded(
 	parent context.Context,
 ) (f FetchedFiles, updated bool, err error) {
-	ctx, cancel := context.WithTimeout(parent, i.Source.FetchTimeout)
+	ctx, cancel := context.WithTimeout(parent, i.Source.FetchTimeout.Duration)
 	defer cancel()
 
 	dest := i.DataPath
diff --git a/internal/fetcher/download.go b/internal/fetcher/download.go
index 7657825..4165886 100644
--- a/internal/fetcher/download.go
+++ b/internal/fetcher/download.go
@@ -26,7 +26,7 @@ var files = map[string]string{
 func (i *DownloadFetcher) FetchIfNeeded(
 	parent context.Context,
 ) (f FetchedFiles, updated bool, err error) {
-	ctx, cancel := context.WithTimeout(parent, i.Source.FetchTimeout)
+	ctx, cancel := context.WithTimeout(parent, i.Source.FetchTimeout.Duration)
 	defer cancel()
 
 	root := i.DataPath
diff --git a/internal/fetcher/nixpkgs-channel.go b/internal/fetcher/nixpkgs-channel.go
index c135641..e36728c 100644
--- a/internal/fetcher/nixpkgs-channel.go
+++ b/internal/fetcher/nixpkgs-channel.go
@@ -32,7 +32,7 @@ var filesToFetch = map[string]string{
 func (i *NixpkgsChannelFetcher) FetchIfNeeded(
 	parent context.Context,
 ) (f FetchedFiles, updated bool, err error) {
-	ctx, cancel := context.WithTimeout(parent, i.Source.FetchTimeout)
+	ctx, cancel := context.WithTimeout(parent, i.Source.FetchTimeout.Duration)
 	defer cancel()
 
 	root := i.DataPath