this was returning an array before in part because it needed to check if the array was empty to detect an error case. now, it doesn't need to do that, so there's no point in returning an array that statically only has one item just to join it with commas later (which will have no effect since it only has one item). If we ever want to modify this, we can just as well change something like `'node12-macos-x64'` to `'node12-macos-x64,node12-macos-arm64'` in the `getTargets` function.
prior to this, the `reject` on line 28 does not hault execution. it's reasonable that this mistake was made because it's an easy one to make if you don't allow the function that ultimately had the failure case to have the control flow.
As it was before, code _after_ the reject was still executing.
Now, the promise rejection is handled in the place it really occurs. Promises are designed to work well with `throw` like this and since there is no other callback that the throw is captured in (e.g. like a setTimeout or something) this is totally fine to do. Here is what the output would look like:
```
> ts-node src/scripts/pkg.ts
Error: [pkg-inso] Unsupported OS: freebsd
at getTargets (/home/dimitri/src/github.com/Kong/insomnia/packages/insomnia-inso/src/scripts/pkg.ts:24:9)
at /home/dimitri/src/github.com/Kong/insomnia/packages/insomnia-inso/src/scripts/pkg.ts:29:21
at new Promise (<anonymous>)
at pkg (/home/dimitri/src/github.com/Kong/insomnia/packages/insomnia-inso/src/scripts/pkg.ts:28:10)
at Object.<anonymous> (/home/dimitri/src/github.com/Kong/insomnia/packages/insomnia-inso/src/scripts/pkg.ts:67:1)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Module.m._compile (/home/dimitri/src/github.com/Kong/insomnia/packages/insomnia-inso/node_modules/ts-node/src/index.ts:1056:23)
at Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Object.require.extensions.<computed> [as .ts] (/home/dimitri/src/github.com/Kong/insomnia/packages/insomnia-inso/node_modules/ts-node/src/index.ts:1059:12)
at Module.load (internal/modules/cjs/loader.js:985:32)
```