SpecsCLIBun Global Upgrade Symlink Detection
Spec: Bun Global Upgrade Symlink Detection
Spec: Bun Global Upgrade Symlink Detection
Initial Situation
dp upgrade detects the package manager used for the global CLI install, then runs the matching global reinstall command. Bun global installs can expose the invoked command as a bin/dp symlink whose target is under install/global/node_modules/@punks/cli.
Issue
When detection only inspected the raw command path, a Bun global symlink outside a .bun path did not match any supported manager. dp upgrade then returned manager-not-detected even though the symlink target had enough information to identify Bun.
Solution
Resolve the entrypoint symlink before package-manager detection and treat Bun's install/global/node_modules/@punks/cli layout as a Bun global install before applying the generic npm node_modules fallback.
Non-Goals
- Changing registry version checks.
- Changing installer commands.
- Changing interactive startup update prompting.
- Guessing a package manager for local dist runs.
Acceptance Criteria
- A regression test proves
bin/dp -> ../install/global/node_modules/@punks/cli/dist/index.jsdetectsbun. - Local dist paths still do not infer a package manager from
npm_config_user_agent. dp upgraderelease notes identify the fix in the next npm package version.- Operator docs mention symlink-aware Bun global detection.