Bug: dsh plugin add with a github: spec links the dependency but does not append it to dsh.profile.bundles #656
Replies: 2 comments
|
Update: the same root cause affects After
So a git-spec install + remove leaves the profile broken until the user manually edits |
|
Correction / root-cause update: my earlier diagnosis (exportsPatch/resolveBundleDir failing for git installs) was WRONG - I verified resolveBundleDir works fine for git-installed bundles, and with a healthy network the full add/remove flow works correctly (bundle appended on add, removed on remove, manifest consistent). What actually happened in the failing runs: the machine has an unstable route to github.com (intermittent ECONNRESET / ETIMEDOUT on the git HEAD probe, with pnpm retries). During those windows:
So this is not a deterministic CLI bug, but there is a robustness gap worth considering: reconcilePlugins runs immediately after pnpm exits; for git-hosted specs pnpm may not have finished materializing node_modules yet (async git checkout). Consider waiting for/verifying the checkout before reconciling, and surfacing pnpm failures more prominently. Thanks for reading - happy to close this if that's the expected behavior. |
Uh oh!
There was an error while loading. Please reload this page.
Environment: dsh 0.1.0-rc.6, pnpm 11.21, Windows. Reporter is the author of the dsh-exa-mcp third-party bundle (https://github.com/MicroHEROX/dsh-exa-mcp).
Steps to reproduce:
dsh plugin --profile exa-key add github:MicroHEROX/dsh-exa-mcp(fresh profile; also reproduced after remove + re-add, twice)+ dsh-exa-mcp git+https://github.com/MicroHEROX/dsh-exa-mcp.gitandDonepackage.jsondependencies getsdsh-exa-mcp: git+https://...and pnpm-lock records itdsh.profile.bundlesis NOT appended ---dump-configshows no# == dsh-exa-mcplayerSame flow with a local directory spec (
add C:/path/dsh-exa-mcp, a link: dependency) DOES append the bundle correctly.Root cause trace (from the shipped lib):
runPlugincallsreconcilePlugins(before, dir)on success;reconcilePluginscallsexportsPatch(packageName, profileDir)which doesresolveBundleDir(...)+readProfileManifest(...).dsh?.bundle?.patch !== undefined. For a git-hosted install that resolve appears to fail (returns false), so the bundle is never pushed and a warningdeclares no dsh.bundleis printed that is easy to miss.Impact: any plugin installed via github:/git+ spec silently does not activate, while the install itself reports success. Workaround for users: manually append the bundle to
dsh.profile.bundlesin the profile package.json, or use--patchoverlays / local path installs.Happy to provide more details or test a fix.
All reactions