MCPcopy Create free account
hub / github.com/crytic/attacknet / InitializeProject

Function InitializeProject

pkg/project/project.go:38–52  ·  view source on GitHub ↗
(path string, force bool)

Source from the content-addressed store, hash-verified

36}
37
38func 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}

Callers 1

mainFunction · 0.92

Calls 2

projectAlreadyExistsFunction · 0.85

Tested by

no test coverage detected