CleanupWorkdir removes the given directory and sets the repositories Workdir to an empty string.
(dir string)
| 29 | |
| 30 | // CleanupWorkdir removes the given directory and sets the repositories Workdir to an empty string. |
| 31 | func (p *Project) CleanupWorkdir(dir string) error { |
| 32 | if err := os.RemoveAll(dir); err != nil { |
| 33 | return err |
| 34 | } |
| 35 | |
| 36 | return p.repo.SetWorkdir("", false) |
| 37 | } |