pub fn install_pinned_cli(
paths: &DataPaths,
req: &NpmInstallRequest,
on_line: &dyn Fn(&'static str, &str),
) -> Result<InstallOutcome, InstallError>Expand description
Install req into its install dir, blocking — call it from
spawn_blocking or a plain thread. The one install routine for
resolvecli and the startup warm-up (warm_used_providers):
- Take the cross-instance lock, and hold it until this returns — so npm never outlives the lock (Codex P2 on #3927: a timed-out RPC used to drop its guard while npm kept writing).
- A valid install already there (another instance finished while this one waited): reuse it. Otherwise clear leftovers, marker and all.
npm install --prefix <dir> <pkg>@<pin>; every output line goes toon_line(stream, line).- Verify the shim, then publish with
COMPLETE_MARKER.