(opts *CloneOptions)
| 94 | } |
| 95 | |
| 96 | func cloneRun(opts *CloneOptions) error { |
| 97 | var optsArray []cmd.Dependable |
| 98 | var err error |
| 99 | if !opts.NoPrompt { |
| 100 | optsArray, err = PromptMissing(opts) |
| 101 | if err != nil { |
| 102 | return err |
| 103 | } |
| 104 | } else { |
| 105 | optsArray = append(optsArray, opts) |
| 106 | } |
| 107 | |
| 108 | for _, o := range optsArray { |
| 109 | if err := o.Commit(); err != nil { |
| 110 | return err |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | if !opts.NoPrompt { |
| 115 | fmt.Fprintln(opts.Out, "\nAutomation Commands:") |
| 116 | for _, o := range optsArray { |
| 117 | o.GenerateAutomationCmd() |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | return nil |
| 122 | } |
| 123 | |
| 124 | func PromptMissing(opts *CloneOptions) ([]cmd.Dependable, error) { |
| 125 | nestedOpts := []cmd.Dependable{} |
no test coverage detected