Fix darwin detection

This commit is contained in:
Asher 2019-10-21 16:51:01 -05:00
parent ece840834d
commit f133b00851
No known key found for this signature in database
GPG Key ID: D63C1EF81242354A

View File

@ -99,7 +99,7 @@ class Builder {
*/
private async target(): Promise<"darwin" | "alpine" | "linux"> {
if (!this._target) {
if (process.env.OSTYPE && /^darwin/.test(process.env.OSTYPE)) {
if (os.platform() === "darwin" || (process.env.OSTYPE && /^darwin/.test(process.env.OSTYPE))) {
this._target = "darwin";
} else {
// Alpine's ldd doesn't have a version flag but if you use an invalid flag