Skip to content

Commit

Permalink
fix(provider): make options available to gpg asset
Browse files Browse the repository at this point in the history
  • Loading branch information
ekristen committed Jan 24, 2025
1 parent f617fe8 commit 61aa89e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions pkg/provider/gpg_asset.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ import (
type GPGAsset struct {
*asset.Asset

KeyID uint64
KeyID uint64
Options *Options

Source ISource
}
Expand All @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion pkg/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 61aa89e

Please sign in to comment.