What happened?
On Windows x64, hunkdiff@0.17.1 installs successfully with npm, but running hunk fails with:
spawnSync %APPDATA%\npm\node_modules\hunkdiff\node_modules\hunkdiff-windows-x64\bin\hunk.exe UNKNOWN
Running the prebuilt executable directly exposes the underlying Windows error:
An Application Control policy has blocked this file.
PowerShell confirms that the distributed executable is not Authenticode-signed:
$hunkExe = "$env:APPDATA\npm\node_modules\hunkdiff\node_modules\hunkdiff-windows-x64\bin\hunk.exe"
Get-AuthenticodeSignature $hunkExe | Select-Object Status, StatusMessage
The signature status is NotSigned.
This appears to be two related problems:
- The published Windows prebuilt executable is unsigned, so Windows Application Control / Smart App Control can block it.
- The npm launcher surfaces only
spawnSync ... UNKNOWN and exits instead of continuing to the bundled Bun/JavaScript fallback.
Steps to reproduce
On a Windows x64 system with Application Control enforcing trust for executables:
npm install --global hunkdiff
hunk --version
Expected behavior
Ideally, the Windows prebuilt executable is Authenticode-signed so Windows can validate its publisher.
If process creation of the native executable fails, the launcher should either:
- fall back to the bundled Bun/JavaScript entrypoint; or
- print an actionable error explaining that Windows Application Control blocked the executable.
Actual behavior
The launcher exits with:
spawnSync %APPDATA%\npm\node_modules\hunkdiff\node_modules\hunkdiff-windows-x64\bin\hunk.exe UNKNOWN
This hides the actionable Windows error and does not attempt the available fallback.
Verified fallback
The packaged Bun executable has a valid Authenticode signature, and invoking the JavaScript entrypoint directly works:
$pkg = "$env:APPDATA\npm\node_modules\hunkdiff"
& "$pkg\node_modules\bun\bin\bun.exe" "$pkg\dist\npm\main.js" --version
Output:
Renaming the blocked prebuilt hunk.exe also allows the existing launcher discovery logic to reach this fallback successfully.
Environment
- Windows x64
- Hunkdiff: 0.17.1
- Node.js: 26.4.0
- npm: 11.17.0
Related issues
What happened?
On Windows x64,
hunkdiff@0.17.1installs successfully with npm, but runninghunkfails with:Running the prebuilt executable directly exposes the underlying Windows error:
PowerShell confirms that the distributed executable is not Authenticode-signed:
The signature status is
NotSigned.This appears to be two related problems:
spawnSync ... UNKNOWNand exits instead of continuing to the bundled Bun/JavaScript fallback.Steps to reproduce
On a Windows x64 system with Application Control enforcing trust for executables:
Expected behavior
Ideally, the Windows prebuilt executable is Authenticode-signed so Windows can validate its publisher.
If process creation of the native executable fails, the launcher should either:
Actual behavior
The launcher exits with:
This hides the actionable Windows error and does not attempt the available fallback.
Verified fallback
The packaged Bun executable has a valid Authenticode signature, and invoking the JavaScript entrypoint directly works:
Output:
Renaming the blocked prebuilt
hunk.exealso allows the existing launcher discovery logic to reach this fallback successfully.Environment
Related issues
spawnSyncprocess-creation error