mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-01-30 08:03:55 +00:00
18 lines
421 B
JavaScript
18 lines
421 B
JavaScript
|
var binary = require('node-binary');
|
||
|
var nodeVersion = 'v0.12.0';
|
||
|
|
||
|
console.log('Downloading node-' + nodeVersion + '-' + process.platform + '-' + process.arch);
|
||
|
|
||
|
binary.download({
|
||
|
os: process.platform,
|
||
|
arch: process.arch,
|
||
|
version: nodeVersion
|
||
|
}, './bin/node', function(error, binaryPath) {
|
||
|
if(error) {
|
||
|
console.error(error.message);
|
||
|
process.exit(1);
|
||
|
}
|
||
|
|
||
|
console.log('NodeJS was downloaded to ' + binaryPath);
|
||
|
});
|