Skip to content

Commit

Permalink
fix: upgrade @types/jasmine from 3.7.1 to 3.7.2 (GoogleContainerTools…
Browse files Browse the repository at this point in the history
…#336)

Snyk has created this PR to upgrade @types/jasmine from 3.7.1 to 3.7.2.

See this package in npm:
https://www.npmjs.com/package/@types/jasmine

See this project in Snyk:
https://app.snyk.io/org/kpt-fn-bot/project/206705c7-640c-491f-9f5b-bcb93537444e?utm_source=github&utm_medium=upgrade-pr
  • Loading branch information
snyk-bot authored and phanimarupaka committed Jun 9, 2021
1 parent bc6f026 commit ac9dc71
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
1 change: 0 additions & 1 deletion examples/fix/simple/.expected/config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
runCount: 1
testType: eval
image: gcr.io/kpt-fn/fix:unstable
includeMetaResources: true
10 changes: 10 additions & 0 deletions functions/go/fix/fixpkg/fix.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,16 @@ func (s *Fix) FixKptfile(node *yaml.RNode, functions []v1alpha2.Function) (*yaml
if err != nil {
return node, err
}

// return if the package with this Kptfile is already fixed
if meta.APIVersion == v1alpha2.KptFileAPIVersion {
s.Results = append(s.Results, &Result{
FilePath: meta.Annotations[kioutil.PathAnnotation],
Message: fmt.Sprintf("This package is already fixed as it is on latest apiVersion %s", v1alpha2.KptFileAPIVersion),
})
return node, nil
}

kfOld, err := v1alpha1.ReadFile(node)
if err != nil {
return node, err
Expand Down
6 changes: 3 additions & 3 deletions functions/go/fix/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func main() {
cmd.Example = generated.FixExamples

if err := cmd.Execute(); err != nil {
fmt.Println(err)
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
}
Expand All @@ -36,10 +36,10 @@ func (fp *FixProcessor) Process(resourceList *framework.ResourceList) error {
resourceList.Result = &framework.Result{
Name: "fix",
}
resourceList.Items, err = s.Filter(resourceList.Items)
_, err = s.Filter(resourceList.Items)
if err != nil {
resourceList.Result.Items = getErrorItem(err.Error())
return nil
return err
}
resourceList.Result.Items = resultsToItems(s)
return nil
Expand Down
1 change: 1 addition & 0 deletions functions/go/fix/v1alpha2/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package v1alpha2

import (
"fmt"

"sigs.k8s.io/kustomize/kyaml/yaml"
)

Expand Down

0 comments on commit ac9dc71

Please sign in to comment.