@ghl-ai/aw 0.1.36-beta.11 → 0.1.36-beta.12
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/commands/pull.mjs +5 -4
- package/git.mjs +3 -1
- package/package.json +1 -1
package/commands/pull.mjs
CHANGED
|
@@ -73,14 +73,15 @@ export async function pullCommand(args) {
|
|
|
73
73
|
log.logWarn(`Conflicts in: ${fetchResult.conflicts.join(', ')}`);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
//
|
|
76
|
+
// Always rebase project worktree's current branch onto origin/main
|
|
77
77
|
const localAw = join(cwd, '.aw');
|
|
78
78
|
if (cwd !== HOME && isWorktree(localAw)) {
|
|
79
79
|
try {
|
|
80
80
|
rebaseOntoOriginMain(localAw);
|
|
81
|
-
if (!silent) log.logStep('
|
|
82
|
-
} catch {
|
|
83
|
-
|
|
81
|
+
if (!silent) log.logStep('Local branch rebased onto latest main');
|
|
82
|
+
} catch (e) {
|
|
83
|
+
const msg = e.message?.split('\n').find(l => l.trim()) ?? e.message;
|
|
84
|
+
if (!silent) log.logWarn(`Rebase skipped: ${msg}`);
|
|
84
85
|
}
|
|
85
86
|
}
|
|
86
87
|
|
package/git.mjs
CHANGED
|
@@ -413,7 +413,9 @@ export function rebaseOntoOriginMain(awHome) {
|
|
|
413
413
|
try {
|
|
414
414
|
execSync(`git -C "${awHome}" rebase origin/${REGISTRY_BASE_BRANCH}`, { stdio: 'pipe' });
|
|
415
415
|
} catch (e) {
|
|
416
|
-
|
|
416
|
+
// Surface stderr so callers can show a meaningful message
|
|
417
|
+
const stderr = e.stderr?.toString().trim() || e.stdout?.toString().trim() || e.message;
|
|
418
|
+
throw new Error(stderr);
|
|
417
419
|
}
|
|
418
420
|
}
|
|
419
421
|
|