finally build from source if nothing was found

This commit is contained in:
igorklopov 2016-08-15 13:52:36 +03:00
parent a2519284d0
commit ceec807feb

View File

@ -1,7 +1,7 @@
import * as system from './system.js';
import { hostArch, hostPlatform } from './system.js'; // eslint-disable-line no-duplicate-imports
import { localPlace, remotePlace } from './places.js';
import assert from 'assert';
import build from './build.js';
import { download } from './cloud.js';
import { exists } from 'fs-promise';
import patchesJson from '../patches/patches.json';
@ -41,7 +41,8 @@ export async function need ({
if (await download(remote, local)) return local;
}
if (!dontBuild) {
assert(false);
await build({ copyDest: local, nodeVersion, targetArch: arch });
return local;
}
}