(path string, force bool)
| 36 | } |
| 37 | |
| 38 | func InitializeProject(path string, force bool) error { |
| 39 | suitePath := filepath.Join(path, suiteDirectory) |
| 40 | configPath := filepath.Join(path, networkConfigDirectory) |
| 41 | |
| 42 | if !force { |
| 43 | exists := projectAlreadyExists(suitePath, configPath) |
| 44 | if exists { |
| 45 | errStr := fmt.Sprintf("A project already exists on %s. Re-run with --force to overwrite.", path) |
| 46 | fmt.Print(errStr) |
| 47 | return errors.New(errStr) |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | return initializeDirectoriesAndFiles(suitePath, configPath) |
| 52 | } |
no test coverage detected