(value)
| 17 | } |
| 18 | |
| 19 | function parseTarget(value) { |
| 20 | if (!value) { |
| 21 | return { |
| 22 | platform: os.platform(), |
| 23 | arch: normalizeArch(os.arch()), |
| 24 | }; |
| 25 | } |
| 26 | |
| 27 | const index = value.indexOf('-'); |
| 28 | if (index === -1) { |
| 29 | throw new Error(`Invalid target '${value}'. Expected platform-arch.`); |
| 30 | } |
| 31 | |
| 32 | return { |
| 33 | platform: value.slice(0, index), |
| 34 | arch: normalizeArch(value.slice(index + 1)), |
| 35 | }; |
| 36 | } |
| 37 | |
| 38 | function run(command, args, options = {}) { |
| 39 | execFileSync(command, args, { |
no test coverage detected