Skip to content

Commit

Permalink
Revert "fix: codesign all binary-like files (#5322)" (#5488)
Browse files Browse the repository at this point in the history
This reverts commit 27ea1b2.
  • Loading branch information
lutzroeder authored Dec 21, 2020
1 parent 637334d commit 0262278
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion packages/app-builder-lib/electron-osx-sign/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,23 @@ module.exports.walkAsync = async function (dirPath) {
const stat = await fs.lstat(filePath)
if (stat.isFile()) {
switch (path.extname(filePath)) {
case '': // Binary
if (path.basename(filePath)[0] !== '.') {
return getFilePathIfBinaryAsync(filePath)
} // Else reject hidden file
break
case '.dylib': // Dynamic library
case '.node': // Native node addon
return filePath
case '.cstemp': // Temporary file generated from past codesign
debuglog('Removing... ' + filePath)
await fs.unlink(filePath)
return
default:
return getFilePathIfBinaryAsync(filePath)
if (path.extname(filePath).indexOf(' ') >= 0) {
// Still consider the file as binary if extension seems invalid
return getFilePathIfBinaryAsync(filePath)
}
}
} else if (stat.isDirectory() && !stat.isSymbolicLink()) {
const result = await _walkAsync(filePath)
Expand Down

0 comments on commit 0262278

Please sign in to comment.