delete removes the dependency if it exists
(dependency kptfile.Dependency)
| 193 | |
| 194 | // delete removes the dependency if it exists |
| 195 | func (c Command) delete(dependency kptfile.Dependency) error { |
| 196 | path := filepath.Join(c.Dir, dependency.Name) |
| 197 | fmt.Fprintf(c.StdOut, "deleting %q from %q\n", dependency.Name, path) |
| 198 | if c.DryRun { |
| 199 | return nil |
| 200 | } |
| 201 | |
| 202 | return os.RemoveAll(path) |
| 203 | } |
no test coverage detected