npm 11 stopped setting npm_config_global=true, so the previous guard `process.env.npm_config_global !== 'true'` always evaluated true and the banner was silently skipped on every install -- including the `npm install -g` case it was supposed to handle. Replace the global-detection (which is unreliable across npm versions) with a positive dev-clone detector: only skip if INIT_CWD points at a checkout of this very package (matched by package.json name). Also keep the CI skip (CI=true / npm_config_ci=true). Verified all three paths: - Real install (no INIT_CWD or INIT_CWD outside repo): banner prints - Dev clone (INIT_CWD = this repo): silent - CI: silent |
||
|---|---|---|
| .. | ||
| scripts | ||
| bin.ts | ||
| detect.ts | ||
| headless.ts | ||
| ipc.ts | ||
| launcher.ts | ||
| logger.ts | ||
| postinstall.ts | ||
| script-manager.ts | ||
| server.ts | ||
| types.ts | ||