MCPcopy Index your code
hub / github.com/jetify-com/devbox / profileIsNotEmpty

Function profileIsNotEmpty

internal/pullbox/files.go:60–72  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

58}
59
60func profileIsNotEmpty(path string) (bool, error) {
61 entries, err := os.ReadDir(path)
62 if err != nil {
63 return false, errors.WithStack(err)
64 }
65 for _, entry := range entries {
66 if entry.Name() != configfile.DefaultName ||
67 isModifiedConfig(filepath.Join(path, entry.Name())) {
68 return true, nil
69 }
70 }
71 return false, nil
72}
73
74func isModifiedConfig(path string) bool {
75 if filepath.Base(path) == configfile.DefaultName {

Callers 1

PullMethod · 0.85

Calls 1

isModifiedConfigFunction · 0.85

Tested by

no test coverage detected