mirror of
https://github.com/tobi/qmd.git
synced 2026-09-14 20:27:06 +08:00
cd22be80f2
Runtime detection only looked for lockfiles inside the package directory. Package-manager installs never place one there: a bun global install writes $BUN_INSTALL/install/global/bun.lock while the package lands in .../install/global/node_modules/@tobilu/qmd/, so bun-installed qmd always ran under whatever node was first on PATH. The native modules were built by the installing runtime, so the next Node major upgrade breaks every store-touching command with ERR_DLOPEN_FAILED (NODE_MODULE_VERSION mismatch). When the package directory has no lockfile, apply the same npm-priority rule one level up, at the install root above node_modules/. npm and Homebrew globals keep no lockfile at either level and still default to node. Adds regression tests covering the bun-global install-root layout and install-root npm priority.