(procName, argsArray = [])
| 15 | const projectPath = new URL(".", import.meta.url).pathname; |
| 16 | |
| 17 | async function shell(procName, argsArray = []) { |
| 18 | // NOTE(philc): Does drake's `sh` function work on Windows? If so, that can replace this function. |
| 19 | if (Deno.build.os == "windows") { |
| 20 | // if win32, prefix arguments with "/c {original command}" |
| 21 | // e.g. "mkdir c:\git\vimium" becomes "cmd.exe /c mkdir c:\git\vimium" |
| 22 | optArray.unshift("/c", procName); |
| 23 | procName = "cmd.exe"; |
| 24 | } |
| 25 | const p = Deno.run({ cmd: [procName].concat(argsArray) }); |
| 26 | const status = await p.status(); |
| 27 | if (!status.success) { |
| 28 | throw new Error(`${procName} ${argsArray} exited with status ${status.code}`); |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | // Clones and augments the manifest.json that we use for Chrome with the keys needed for Firefox. |
| 33 | function createFirefoxManifest(manifest) { |
no test coverage detected