mirror of
https://github.com/affaan-m/ECC.git
synced 2026-11-18 22:12:16 +00:00
fix(install): guard state before selective merge
This commit is contained in:
1 parent
55c3cb5bb0
commit
faaa21c4e4
3 files changed
+28
-2
No files matched your search
@@ -337,8 +337,12 @@ function previewInstallPlan(plan) {
|
||||
|
||||
function applyInstallPlan(plan, dependencies = {}) {
|
||||
const persistInstallState = dependencies.writeInstallState || writeInstallState;
|
||||
const beforeInstallStateRead = dependencies.beforeInstallStateRead;
|
||||
const beforeOperationWrite = dependencies.beforeOperationWrite;
|
||||
const beforeInstallStateWrite = dependencies.beforeInstallStateWrite;
|
||||
if (typeof beforeInstallStateRead === 'function') {
|
||||
beforeInstallStateRead({ plan });
|
||||
}
|
||||
const migration = prepareClaudeSkillMigration(plan);
|
||||
const appliedPlan = {
|
||||
...plan,
|
||||
|
||||
@@ -327,6 +327,7 @@ async function applyPreflightedManagedPlan(entry) {
|
||||
);
|
||||
|
||||
const result = require('./install-executor').applyInstallPlan(preview.plan, {
|
||||
beforeInstallStateRead: assertStateUnchanged,
|
||||
beforeOperationWrite({ operation }) {
|
||||
assertStateUnchanged();
|
||||
const expected = preview.operations[operationIndex];
|
||||
|
||||
Reference in new issue
Block a user