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

Function parseArgs

scripts/verify-native-pack.mjs:26–45  ·  view source on GitHub ↗
(argv)

Source from the content-addressed store, hash-verified

24}
25
26function parseArgs(argv) {
27 const args = { pkgDir: join(ROOT, "packages", "native"), hostOnly: false };
28 for (let i = 2; i < argv.length; i++) {
29 const a = argv[i];
30 if (a === "--pkg") {
31 const v = argv[i + 1];
32 if (typeof v !== "string" || v.length === 0)
33 die("verify-native-pack: --pkg requires a value");
34 args.pkgDir = resolve(ROOT, v);
35 i++;
36 continue;
37 }
38 if (a === "--host-only") {
39 args.hostOnly = true;
40 continue;
41 }
42 die(`verify-native-pack: unknown arg: ${a}`);
43 }
44 return args;
45}
46
47function resolveHostSuffix() {
48 if (process.platform === "linux") {

Callers 1

Calls 2

resolveFunction · 0.85
dieFunction · 0.70

Tested by

no test coverage detected