@pify/swarm 0.7.4 → 0.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/extensions/swarm.ts +9 -1
- package/package.json +1 -1
package/extensions/swarm.ts
CHANGED
|
@@ -316,7 +316,15 @@ export default function swarm(pi: ExtensionAPI) {
|
|
|
316
316
|
try {
|
|
317
317
|
const iso = createIsolationWorktree(ctx.cwd, run.runId + "-i" + (item.index + 1));
|
|
318
318
|
await runItem(ctx, run.runId, def, item, context, iso.path, mailbox);
|
|
319
|
-
|
|
319
|
+
// Remove the worktree when the item changed nothing — the cleanup
|
|
320
|
+
// the README promised but the code never performed (removeIfUnchanged
|
|
321
|
+
// was imported and never called, leaking a worktree + branch per
|
|
322
|
+
// read-only item). Kept when there is work to merge, and only then
|
|
323
|
+
// is the merge note worth showing.
|
|
324
|
+
const removed = removeIfUnchanged(ctx.cwd, iso);
|
|
325
|
+
if (item.result !== null) {
|
|
326
|
+
item.result = `${item.result}\n\n${removed ? CLEAN_WORKTREE_NOTE : isolationNote(iso)}`;
|
|
327
|
+
}
|
|
320
328
|
} catch (err) {
|
|
321
329
|
item.status = "error";
|
|
322
330
|
item.error = err instanceof Error ? err.message : String(err);
|
package/package.json
CHANGED