MCPcopy Create free account
hub / github.com/Noumena-Network/code / getCloudStatusViaSapling

Function getCloudStatusViaSapling

src/utils/citcWorkspaceSource.ts:144–168  ·  view source on GitHub ↗
(repoRoot: string)

Source from the content-addressed store, hash-verified

142}
143
144async function getCloudStatusViaSapling(repoRoot: string): Promise<string | null> {
145 const candidates = [process.env.NCODE_HG_BINARY, 'sl'].filter(
146 (candidate): candidate is string => Boolean(candidate),
147 )
148
149 for (const candidate of candidates) {
150 const result = await execFileNoThrow(
151 candidate,
152 ['-R', repoRoot, 'cloud', 'status'],
153 {
154 useCwd: false,
155 timeout: 15_000,
156 },
157 )
158
159 if (result.code === 0) {
160 const output = result.stdout.trim() || result.stderr.trim()
161 if (output) {
162 return output
163 }
164 }
165 }
166
167 return null
168}
169
170export async function detectCitcWorkspaceSourceForPath(
171 startPath: string,

Callers

nothing calls this directly

Calls 1

execFileNoThrowFunction · 0.70

Tested by

no test coverage detected