加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
install.js 710 Bytes
一键复制 编辑 原始数据 按行查看 历史
'use strict';
const { spawnSync } = require('child_process');
const forceFailOnNonZero = (process.env.CI_CHECK_FAIL === 'ssh2');
// Attempt to build the bundled optional binding
const args = [
`--target=${process.version}`,
`--real_openssl_major=${/^\d+/.exec(process.versions.openssl)[0]}`,
'rebuild',
];
const result = spawnSync('node-gyp', args, {
cwd: 'lib/protocol/crypto',
encoding: 'utf8',
shell: true,
stdio: 'inherit',
windowsHide: true,
});
if (result.error || result.status !== 0) {
console.log('Failed to build optional crypto binding');
if (forceFailOnNonZero)
process.exit(1);
} else {
console.log('Succeeded in building optional crypto binding');
}
process.exit(0);
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化