chore: skip the .bin from folder hashing due to npm not cleaning up symlinks (#14888)

- fix the ia32 specs not running on CI
 - handle rejected promises in the "spec-runner" script
This commit is contained in:
Samuel Attard 2018-10-02 00:00:04 +10:00 committed by Alexey Kuzmin
parent 60ac03c08f
commit 40b676fee8

View file

@ -52,6 +52,9 @@ getSpecHash().then(([currentSpecHash, currentSpecInstallHash]) => {
child.on('exit', (code) => {
process.exit(code)
})
}).catch((error) => {
console.error('An error occurred inside the spec runner', error)
process.exit(1)
})
function getSpecHash () {
@ -67,7 +70,11 @@ function getSpecHash () {
if (!fs.existsSync(specNodeModulesPath)) {
return resolve('invalid')
}
hashElement(specNodeModulesPath).then((result) => resolve(result.hash)).catch(reject)
hashElement(specNodeModulesPath, {
folders: {
exclude: ['.bin']
}
}).then((result) => resolve(result.hash)).catch(reject)
})
])
}