@wipcomputer/wip-ldm-os 0.4.73-alpha.25 → 0.4.73-alpha.26
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/bin/ldm.js +10 -0
- package/package.json +1 -1
package/bin/ldm.js
CHANGED
|
@@ -2380,6 +2380,16 @@ async function cmdInstallCatalog() {
|
|
|
2380
2380
|
ok('Boot hook updated (sessions, messages, updates now active)');
|
|
2381
2381
|
}
|
|
2382
2382
|
|
|
2383
|
+
// Deploy git pre-commit hook on every install (not just init)
|
|
2384
|
+
const hooksDir = join(LDM_ROOT, 'hooks');
|
|
2385
|
+
const preCommitDest = join(hooksDir, 'pre-commit');
|
|
2386
|
+
const preCommitSrc = join(__dirname, '..', 'templates', 'hooks', 'pre-commit');
|
|
2387
|
+
if (existsSync(preCommitSrc)) {
|
|
2388
|
+
if (!existsSync(hooksDir)) mkdirSync(hooksDir, { recursive: true });
|
|
2389
|
+
cpSync(preCommitSrc, preCommitDest);
|
|
2390
|
+
chmodSync(preCommitDest, 0o755);
|
|
2391
|
+
}
|
|
2392
|
+
|
|
2383
2393
|
console.log('');
|
|
2384
2394
|
console.log(` Updated ${updated}/${totalUpdates} extension(s).`);
|
|
2385
2395
|
installLog(`ldm install complete: ${updated}/${totalUpdates} updated, ${healthFixes} health fix(es)`);
|