MCPcopy Index your code
hub / github.com/codeaashu/claude-code / parseRegQueryStdout

Function parseRegQueryStdout

src/utils/settings/mdm/settings.ts:208–222  ·  view source on GitHub ↗
(
  stdout: string,
  valueName = 'Settings',
)

Source from the content-addressed store, hash-verified

206 * Settings REG_SZ {"json":"value"}
207 */
208export function parseRegQueryStdout(
209 stdout: string,
210 valueName = 'Settings',
211): string | null {
212 const lines = stdout.split(/\r?\n/)
213 const escaped = valueName.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
214 const re = new RegExp(`^\\s+${escaped}\\s+REG_(?:EXPAND_)?SZ\\s+(.*)$`, 'i')
215 for (const line of lines) {
216 const match = line.match(re)
217 if (match && match[1]) {
218 return match[1].trimEnd()
219 }
220 }
221 return null
222}
223
224/**
225 * Convert raw subprocess output into parsed MDM and HKCU results,

Callers 1

consumeRawReadResultFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected