()
| 35 | } |
| 36 | |
| 37 | const discoverAsarUnpackedDirs = () => { |
| 38 | if (!hasPath(releaseDir)) { |
| 39 | return [] |
| 40 | } |
| 41 | |
| 42 | const unpackedCandidates = fs |
| 43 | .readdirSync(releaseDir, { withFileTypes: true }) |
| 44 | .filter((entry) => entry.isDirectory() && entry.name.endsWith('-unpacked')) |
| 45 | .map((entry) => ({ |
| 46 | name: entry.name, |
| 47 | asarUnpackedPath: path.join( |
| 48 | releaseDir, |
| 49 | entry.name, |
| 50 | 'resources', |
| 51 | 'app.asar.unpacked', |
| 52 | ), |
| 53 | })) |
| 54 | .filter((entry) => hasPath(entry.asarUnpackedPath)) |
| 55 | |
| 56 | const archSpecific = unpackedCandidates.filter((entry) => |
| 57 | archMatchPattern.test(entry.name), |
| 58 | ) |
| 59 | |
| 60 | if (archSpecific.length) { |
| 61 | return archSpecific |
| 62 | } |
| 63 | |
| 64 | return unpackedCandidates.filter( |
| 65 | (entry) => targetArch === 'x64' && entry.name === 'linux-unpacked', |
| 66 | ) |
| 67 | } |
| 68 | |
| 69 | const verifyBinaries = (config, unpackedDirs) => { |
| 70 | if (!unpackedDirs.length) { |
no test coverage detected