diff --git a/pkg/provider/gpg_asset.go b/pkg/provider/gpg_asset.go index 01b7361..b7d4b84 100644 --- a/pkg/provider/gpg_asset.go +++ b/pkg/provider/gpg_asset.go @@ -18,7 +18,8 @@ import ( type GPGAsset struct { *asset.Asset - KeyID uint64 + KeyID uint64 + Options *Options Source ISource } @@ -39,7 +40,7 @@ func (a *GPGAsset) Download(ctx context.Context) error { return err } - downloadsDir := a.Source.GetOptions().Config.GetDownloadsPath() + downloadsDir := a.Options.Config.GetDownloadsPath() filename := strconv.FormatUint(a.KeyID, 10) assetFile := filepath.Join(downloadsDir, filename) diff --git a/pkg/provider/provider.go b/pkg/provider/provider.go index abc04e8..472e4fb 100644 --- a/pkg/provider/provider.go +++ b/pkg/provider/provider.go @@ -499,7 +499,8 @@ func (p *Provider) discoverMatch() error { //nolint:gocyclo keyName := strings.ReplaceAll(a.GetName(), ".asc", ".pub") gpgAsset := &GPGAsset{ - Asset: asset.New(keyName, "", p.GetOS(), p.GetArch(), ""), + Asset: asset.New(keyName, "", p.GetOS(), p.GetArch(), ""), + Options: p.GetOptions(), } logrus.WithField("sig", a.GetName()).WithField("key", gpgAsset.GetName()).Trace("matched asset")