Replies: 1 comment
|
Verified on rc.8 ( One safety caveat for the proposed existence check: I documented the five distinct states (materialized, dependency-recorded, built, reconciled, bootable), operator retry/rollback paths, and a 12-gate regression matrix here: https://sandbaseai.github.io/deepseek-harness-handbook/plugin-add-nonzero-reconcile.html |
Uh oh!
There was an error while loading. Please reload this page.
When dsh plugin add installs a plugin from GitHub and pnpm returns non-zero exit code (e.g., a blocked prepare script with pnpm 10), the plugin package installs to node_modules but reconcilePlugins is skipped. This means the bundle never appears in dsh.profile.bundles and the plugin cordis.patch.yml is never merged on startup.
The fix is in apps/cli/src/plugin.ts in the runPlugin() function. When pnpm returns non-zero, check if the package exists in node_modules. If it does, call reconcilePlugins anyway so the bundle list is still updated.
Proposed code:
if (exitCode !== 0) {
const pkgPath = join(dir, 'node_modules', packageName)
if (existsSync(join(pkgPath, 'package.json'))) reconcilePlugins(before, dir)
}
This handles the case where the package installed successfully but pnpm returned non-zero due to allowBuilds or similar issues. Source: apps/cli/src/plugin.ts
All reactions