// Re-apply +x on bin/ binaries — npm publish strips the bit from
// regular files (only `bin` field entries get it preserved). Without
// this, the parent skalpel shim hits EACCES on spawn. Best-effort:
// silently skip on Windows or if a binary is missing.
'use strict';
if (process.platform === 'win32') {
  process.exit(0);
}
var fs = require('fs');
var path = require('path');
['skalpel', 'skalpeld'].forEach(function (name) {
  var p = path.join(__dirname, 'bin', name);
  try {
    fs.chmodSync(p, 0o755);
  } catch (_err) {
    // file missing or permission denied — non-critical for the
    // parent shim's resolve path; surface via the parent's own
    // EACCES if the binary then fails to spawn.
  }
});
