fix(commands): surface core fetch errors, run post-install in the project, exit 1 on invalid project command; document compat flow

This commit is contained in:
kj
2026-10-05 17:36:08 -03:00
parent eb5e6eeed4
commit 6925b814e6
6 changed files with 97 additions and 55 deletions
@@ -36,7 +36,12 @@ final class CoreProvider
throw new ToolboxException('No se pudo clonar el core: ' . implode("\n", $out));
}
} else {
exec('git -C ' . escapeshellarg($dir) . ' fetch -q --tags 2>&1');
exec('git -C ' . escapeshellarg($dir) . ' remote set-url origin ' . escapeshellarg($url) . ' 2>&1');
$out = [];
exec('git -C ' . escapeshellarg($dir) . ' fetch -q --tags 2>&1', $out, $code);
if ($code !== 0) {
throw new ToolboxException('No se pudo actualizar el core: ' . implode("\n", $out));
}
}
$provider = new self($dir);