You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
npm launcher exits 0 when the native icp binary is killed by a signal #889
The npm package's launcher (npm/icp-cli/bin/icp.js) forwards the child's exit code with child.on('exit', (code) => process.exit(code)). When the native icp binary is killed by a signal (the OOM killer, SIGKILL, a crash), Node calls this handler with code === null and the signal name as the second argument. process.exit(null) exits with status 0, so scripts and CI see a failed command as a success.
Only the npm install (@icp-sdk/icp-cli) is affected: the Homebrew, install-script and cargo installs run the native binary directly.
Reproduction
icp-cli 1.8.0 from npm, macOS arm64, Node v26.10.0:
mkfifo f1
icp identity import repro --storage plaintext --from-pem f1 &# blocks reading the FIFO
L=$!; sleep 3
kill -KILL "$(pgrep -P "$L")"# kill the native childwait"$L";echo"exit status: $?"
Output:
exit status: 0
The identity is not created.
Impact
Any script that checks icp's exit status treats an interrupted command as a success. For example, an interrupted icp build leaves the previous artifact in .icp/cache/artifacts/, and a following install or publish step uses it.
Suggested fix
Re-raise the child's signal, or exit non-zero when there is no code:
Activity