(dirPath)
| 20 | }; |
| 21 | |
| 22 | function* findScriptFilesRecursively(dirPath) { |
| 23 | const entries = readdirSync(dirPath, { withFileTypes: true }); |
| 24 | |
| 25 | for (const entry of entries) { |
| 26 | const path = join(dirPath, entry.name); |
| 27 | |
| 28 | if ( |
| 29 | entry.isDirectory() && |
| 30 | entry.name !== 'build' && |
| 31 | entry.name !== 'changelogs' && |
| 32 | entry.name !== 'deps' && |
| 33 | entry.name !== 'fixtures' && |
| 34 | entry.name !== 'gyp' && |
| 35 | entry.name !== 'inspector_protocol' && |
| 36 | entry.name !== 'node_modules' && |
| 37 | entry.name !== 'out' && |
| 38 | entry.name !== 'tmp' |
| 39 | ) { |
| 40 | yield* findScriptFilesRecursively(path); |
| 41 | } else if (entry.isFile() && extname(entry.name) === '.sh') { |
| 42 | yield path; |
| 43 | } |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | const expectedHashBang = Buffer.from('#!/bin/sh\n'); |
| 48 | async function hasInvalidHashBang(fd) { |
no test coverage detected
searching dependent graphs…