@@ -17,7 +17,7 @@ import (
1717// ArchiveFetcher implementations should get the URL, validate the contents
1818// against the checksum and leave the unpacked version in the dir.
1919type ArchiveFetcher interface {
20- Fetch ( archiveURL , checksum , dir string ) error
20+ FetchWithContext ( ctx context. Context , archiveURL , checksum , dir string ) error
2121}
2222
2323// RepositoryParser fetches archives from a Repository and parses the
@@ -44,7 +44,7 @@ func (p *RepositoryParser) GenerateFromFiles(ctx context.Context, archiveURL, ch
4444 }
4545 }()
4646
47- if err := p .fetcher .Fetch ( archiveURL , checksum , tempDir ); err != nil {
47+ if err := p .fetcher .FetchWithContext ( ctx , archiveURL , checksum , tempDir ); err != nil {
4848 return nil , fmt .Errorf ("failed to get archive URL %s: %w" , archiveURL , err )
4949 }
5050
@@ -82,7 +82,7 @@ func (p *RepositoryParser) GenerateFromDirectories(ctx context.Context, archiveU
8282 }
8383 }()
8484
85- if err := p .fetcher .Fetch ( archiveURL , checksum , tempDir ); err != nil {
85+ if err := p .fetcher .FetchWithContext ( ctx , archiveURL , checksum , tempDir ); err != nil {
8686 return nil , fmt .Errorf ("failed to get archive URL %s: %w" , archiveURL , err )
8787 }
8888
0 commit comments