pinokiod 5.0.6 → 5.0.7
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/kernel/git.js +10 -0
- package/package.json +1 -1
package/kernel/git.js
CHANGED
|
@@ -40,6 +40,16 @@ class Git {
|
|
|
40
40
|
const dest = path.resolve(this.kernel.homedir, `scripts/git/${name}.json`)
|
|
41
41
|
return fs.promises.copyFile(src, dest)
|
|
42
42
|
}))
|
|
43
|
+
|
|
44
|
+
// best-effort: clear any stale index.lock files across all known repos at startup
|
|
45
|
+
try {
|
|
46
|
+
const repos = await this.repos(this.kernel.path("api"))
|
|
47
|
+
for (const repo of repos) {
|
|
48
|
+
if (repo && repo.dir) {
|
|
49
|
+
await this.clearStaleLock(repo.dir)
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
} catch (_) {}
|
|
43
53
|
}
|
|
44
54
|
async ensureDefaults(homeOverride) {
|
|
45
55
|
const home = homeOverride || this.kernel.homedir
|