kaizen-agent 0.1.0 → 0.1.1
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/cli/install.ts +10 -2
- package/package.json +1 -1
package/cli/install.ts
CHANGED
|
@@ -17,8 +17,16 @@ async function resolveRepo() {
|
|
|
17
17
|
|
|
18
18
|
const dest = process.env.KAIZEN_HOME ?? join(home, "kaizen");
|
|
19
19
|
if (existsSync(join(dest, ".git"))) {
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
// A pull can refuse for reasons that have nothing to do with linking — local
|
|
21
|
+
// edits, a detached head, no network. Linking the checkout that is already
|
|
22
|
+
// there still works, so say what happened and carry on rather than failing
|
|
23
|
+
// the install over it.
|
|
24
|
+
try {
|
|
25
|
+
await Bun.$`git -C ${dest} pull --ff-only`.quiet();
|
|
26
|
+
console.log(`update ${dest}`);
|
|
27
|
+
} catch {
|
|
28
|
+
console.log(`skip ${dest} — could not pull, linking what is there`);
|
|
29
|
+
}
|
|
22
30
|
return dest;
|
|
23
31
|
}
|
|
24
32
|
console.log(`clone ${REPO_URL} -> ${dest}`);
|