when the binary download fails (network down, 404, timeout), postinstall.js logs the error and exits with code 0:
// npm/postinstall.js:76-80
console.error('optiqor: failed to install binary:', err.message);
console.error('optiqor: this is non-fatal — build from source if needed:');
console.error(' go install github.com/optiqor/optiqor-cli/cmd/optiqor@latest');
...
process.exit(0);
npm install -g @optiqor/cli then reports success while no binary was actually installed. the user runs optiqor later, hits the "binary not found" branch in npm/index.js:11, and has no signal that the install was the cause.
current behavior trades a clear error for silent corruption. wrong default for a CLI tool. two options:
process.exit(1) so npm reports the install as failed and the user sees it immediately
- drop a stub at
vendor/optiqor that prints the build-from-source message when invoked, so optiqor always runs and the error surface stays consistent
option 1 is a one-line change. option 2 is a few lines but cleaner UX.
when the binary download fails (network down, 404, timeout),
postinstall.jslogs the error and exits with code 0:npm install -g @optiqor/clithen reports success while no binary was actually installed. the user runsoptiqorlater, hits the "binary not found" branch innpm/index.js:11, and has no signal that the install was the cause.current behavior trades a clear error for silent corruption. wrong default for a CLI tool. two options:
process.exit(1)so npm reports the install as failed and the user sees it immediatelyvendor/optiqorthat prints the build-from-source message when invoked, sooptiqoralways runs and the error surface stays consistentoption 1 is a one-line change. option 2 is a few lines but cleaner UX.