#!/usr/bin/env node
/**
 * Postinstall script to set execute permissions on the binary.
 * npm doesn't preserve file permissions, so we need to set them after install.
 */
const { chmodSync } = require('fs');
const { join } = require('path');

const binaryPath = join(__dirname, 'harnspec-http');

try {
  chmodSync(binaryPath, 0o755);
  console.log('✓ Set execute permissions on harnspec-http binary');
} catch (err) {
  console.error('Warning: Could not set execute permissions:', err.message);
  // Don't fail the install
}
