@paleo/worktree-env 0.7.2 → 0.7.3
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/dist/setup-worktree.js +13 -3
- package/package.json +1 -1
package/dist/setup-worktree.js
CHANGED
|
@@ -66,7 +66,7 @@ export async function runSetupWorktree(config) {
|
|
|
66
66
|
}
|
|
67
67
|
const { slot } = await runSetup(args, ctx, run, config);
|
|
68
68
|
if (isWaitMode(args)) {
|
|
69
|
-
await waitForSlot(slot, config);
|
|
69
|
+
await waitForSlot(slot, config, { printSummary: false });
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
async function runSetup(args, ctx, run, config) {
|
|
@@ -257,10 +257,12 @@ function runInfo(args, config) {
|
|
|
257
257
|
printWorktreeInfo(config, resolved.slot, ".", { branch: resolved.branch, owner: resolved.owner });
|
|
258
258
|
}
|
|
259
259
|
async function runWait(args, config) {
|
|
260
|
+
// standalone --wait (no prior setup in this invocation) → print the full summary on success.
|
|
260
261
|
const slot = resolveTargetSlot(args, config);
|
|
261
262
|
await waitForSlot(slot, config);
|
|
262
263
|
}
|
|
263
|
-
async function waitForSlot(slot, config) {
|
|
264
|
+
async function waitForSlot(slot, config, options = {}) {
|
|
265
|
+
const printSummary = options.printSummary ?? true;
|
|
264
266
|
const ctx = detectWorktree();
|
|
265
267
|
const initial = readSlots(ctx.mainWorktree, config.registryDir).slots[String(slot)];
|
|
266
268
|
if (!initial) {
|
|
@@ -277,7 +279,15 @@ async function waitForSlot(slot, config) {
|
|
|
277
279
|
process.exit(1);
|
|
278
280
|
}
|
|
279
281
|
if (entry.status === "ready") {
|
|
280
|
-
|
|
282
|
+
if (printSummary) {
|
|
283
|
+
printWorktreeInfo(config, slot, entry.worktree, {
|
|
284
|
+
branch: entry.branch,
|
|
285
|
+
owner: entry.owner,
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
else {
|
|
289
|
+
console.log("Status: ready");
|
|
290
|
+
}
|
|
281
291
|
return;
|
|
282
292
|
}
|
|
283
293
|
if (entry.status === "failed") {
|