diff --git a/pkg/config/package.go b/pkg/config/package.go index ce73a5465..a7da000ff 100644 --- a/pkg/config/package.go +++ b/pkg/config/package.go @@ -288,10 +288,7 @@ func (p *Package) renderAsset(rt *runtime.Runtime) (string, error) { case PkgInfoTypeGitHubArchive, PkgInfoTypeGoBuild: return "", nil case PkgInfoTypeGoInstall: - if pkgInfo.Asset != "" { - return pkgInfo.Asset, nil - } - return path.Base(pkgInfo.GetPath()), nil + return path.Base(pkgInfo.GetFiles()[0].Name), nil case PkgInfoTypeGitHubContent: s, err := p.RenderTemplateString(pkgInfo.Path, rt) if err != nil { diff --git a/pkg/config/registry/package_info.go b/pkg/config/registry/package_info.go index 7e6af52e1..b4bbcaef4 100644 --- a/pkg/config/registry/package_info.go +++ b/pkg/config/registry/package_info.go @@ -409,7 +409,10 @@ func (p *PackageInfo) OverrideByRuntime(rt *runtime.Runtime) { //nolint:cyclop,f } func (p *PackageInfo) OverrideByBuild() { - p.Type = p.Build.Type + if p.Type != p.Build.Type { + p.resetByPkgType(p.Build.Type) + p.Type = p.Build.Type + } if p.Build.Path != "" { p.Path = p.Build.Path }