Browse Source

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
Samuel Attard 6 years ago
parent
commit
40b676fee8
1 changed files with 8 additions and 1 deletions
  1. 8 1
      script/spec-runner.js

+ 8 - 1
script/spec-runner.js

@@ -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)
     })
   ])
 }