Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
michalpristas committed Jan 17, 2025
1 parent 822e308 commit aadc6fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions internal/pkg/agent/application/upgrade/step_unpack.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ func skipFnFromZip(log *logger.Logger, r *zip.ReadCloser, detectedFlavor string,

flavor, err := install.Flavor(detectedFlavor, "", registry)
if err != nil {
if err == install.ErrUnknownFlavor {
if errors.Is(err, install.ErrUnknownFlavor) {
// unknown flavor fallback to copy all
return func(relPath string) bool { return false }, nil
}
Expand Down Expand Up @@ -524,7 +524,7 @@ func skipFnFromTar(log *logger.Logger, archivePath string, flavor string) (insta
var allowedPaths []string
flavorDefinition, err := loadFlavor(flavor)
if err != nil {
if err == install.ErrUnknownFlavor {
if errors.Is(err, install.ErrUnknownFlavor) {
// unknown flavor fallback to copy all
return func(relPath string) bool { return false }, nil
}
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/agent/install/flavors.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func LoadRegistry(r io.Reader) (FlavorsRegistry, error) {
flavorMap := make(map[string][]string)
d := yaml.NewDecoder(r)
if err := d.Decode(flavorMap); err != nil {
return FlavorsRegistry{}, fmt.Errorf("failed to parse flavor registry: %v", err)
return FlavorsRegistry{}, fmt.Errorf("failed to parse flavor registry: %w", err)
}

reg := make(FlavorsRegistry)
Expand Down

0 comments on commit aadc6fe

Please sign in to comment.