(cmd, args, cwd)
| 77 | } |
| 78 | |
| 79 | function run(cmd, args, cwd) { |
| 80 | const res = spawnSync(cmd, args, { |
| 81 | cwd, |
| 82 | encoding: "utf8", |
| 83 | stdio: ["ignore", "pipe", "pipe"], |
| 84 | shell: process.platform === "win32", |
| 85 | }); |
| 86 | if (res.status !== 0) { |
| 87 | die( |
| 88 | [ |
| 89 | `verify-native-pack: command failed: ${cmd} ${args.join(" ")}`, |
| 90 | `cwd: ${cwd}`, |
| 91 | res.stdout?.trim() ? `stdout:\n${res.stdout.trim()}` : "", |
| 92 | res.stderr?.trim() ? `stderr:\n${res.stderr.trim()}` : "", |
| 93 | ] |
| 94 | .filter((l) => l.length > 0) |
| 95 | .join("\n\n"), |
| 96 | ); |
| 97 | } |
| 98 | return (res.stdout ?? "").trim(); |
| 99 | } |
| 100 | |
| 101 | const { pkgDir, hostOnly } = parseArgs(process.argv); |
| 102 | const pkgJsonPath = join(pkgDir, "package.json"); |
no test coverage detected