MCPcopy
hub / github.com/antfu/skills / submoduleExists

Function submoduleExists

scripts/cli.ts:29–35  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

27}
28
29function submoduleExists(path: string): boolean {
30 const gitmodules = join(root, '.gitmodules')
31 if (!existsSync(gitmodules))
32 return false
33 const content = readFileSync(gitmodules, 'utf-8')
34 return content.includes(`path = ${path}`)
35}
36
37const RE_SUBMODULE_PATH = /path\s*=\s*(.+)/g
38

Callers 1

initSubmodulesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected