fix: retarget updater to @mosaic/mosaic
All checks were successful
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/push/ci Pipeline was successful

This commit is contained in:
Jarvis
2026-04-04 20:42:18 -05:00
parent 543388e18b
commit e6d5fe5773
9 changed files with 280 additions and 34 deletions

View File

@@ -314,7 +314,8 @@ program
.description('Check for and install Mosaic CLI updates')
.option('--check', 'Check only, do not install')
.action(async (opts: { check?: boolean }) => {
const { checkForUpdate, formatUpdateNotice } = await import('@mosaic/mosaic');
const { checkForUpdate, formatUpdateNotice, getInstallCommand } =
await import('@mosaic/mosaic');
const { execSync } = await import('node:child_process');
console.log('Checking for updates…');
@@ -344,7 +345,7 @@ program
try {
// Relies on @mosaic:registry in ~/.npmrc — do NOT pass --registry
// globally or non-@mosaic deps will 404 against the Gitea registry.
execSync('npm install -g @mosaic/cli@latest', {
execSync(getInstallCommand(result), {
stdio: 'inherit',
timeout: 60_000,
});