Skip to content

Commit

Permalink
disable option init to check ci
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-chenzz committed Dec 13, 2023
1 parent 1fb4bdf commit fd4d316
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions kustomize/commands/edit/add/addreplacement.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@ type addReplacementOptions struct {

func newCmdAddReplacement(fSys filesys.FileSystem) *cobra.Command {
var o addReplacementOptions
o.Replacement.Source = &types.SourceSelector{}
o.Replacement.Targets = append(o.Replacement.Targets, &types.TargetSelector{})
/*o.Replacement.Source = &types.SourceSelector{}
o.Replacement.Targets = append(o.Replacement.Targets, &types.TargetSelector{})*/
cmd := &cobra.Command{
Use: "replacement",
Short: "add an item to replacement field",
Long: `this command will add an item to replacement field in the kustomization file.
the item will be:
- be either a file, or an inline string
The item must be either a file, or an inline string.
`,
Example: `
# Adds a replacement file to the kustomization file
Expand Down Expand Up @@ -66,12 +65,12 @@ func (o *addReplacementOptions) RunAddReplacement(fSys filesys.FileSystem) error
return fmt.Errorf("failed to read kustomization file: %w", err)
}

if o.Replacement.Targets != nil {
/*if o.Replacement.Targets != nil {
o.Replacement.Targets = nil
}
if o.Replacement.Source != nil {
o.Replacement.Source = nil
}
}*/

for _, r := range m.Replacements {
if len(r.Path) > 0 && r.Path == o.Replacement.Path {
Expand Down

0 comments on commit fd4d316

Please sign in to comment.