MCPcopy Create free account
hub / github.com/RtlZeroMemory/Rezi / parseCmdSetOutput

Function parseCmdSetOutput

packages/native/scripts/build-native.mjs:23–36  ·  view source on GitHub ↗
(output)

Source from the content-addressed store, hash-verified

21}
22
23function parseCmdSetOutput(output) {
24 const next = {};
25 for (const raw of output.split(/\r?\n/)) {
26 const line = raw.trimEnd();
27 if (line.length === 0) continue;
28 const idx = line.indexOf("=");
29 if (idx <= 0) continue;
30 const key = line.slice(0, idx);
31 // cmd.exe prints internal per-drive cwd entries like `=C:=C:\...`.
32 if (key.startsWith("=")) continue;
33 next[key] = line.slice(idx + 1);
34 }
35 return next;
36}
37
38function runBatchAndGetEnv(batchFile, batchArgs, env) {
39 const args = Array.isArray(batchArgs) ? batchArgs : [];

Callers 1

runBatchAndGetEnvFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected