Skip to content

Commit

Permalink
kustomize edit add replacement
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-chenzz committed Nov 17, 2023
1 parent 4fffbba commit af18c2f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion kustomize/commands/edit/add/addreplacement.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (o *addReplacementOptions) RunAddReplacement(fSys filesys.FileSystem) error
for _, r := range m.Replacements {
if len(r.Path) > 0 && r.Path == o.Replacement.Path {
log.Printf("replacement %#v already in kustomization file", r)
return errors.New("already in kust")
return errors.New("already in kustomization file")
}
}
m.Replacements = append(m.Replacements, o.Replacement)
Expand Down
2 changes: 1 addition & 1 deletion kustomize/commands/edit/add/addreplacement_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func TestAddReplacementAlreadyThere(t *testing.T) {
cmd.SetArgs(args)
assert.NoError(t, cmd.Execute())

assert.NoError(t, cmd.Execute())
assert.Error(t, cmd.Execute())
}

func TestAddReplacementNoArgs(t *testing.T) {
Expand Down

0 comments on commit af18c2f

Please sign in to comment.