INNER CODE UNIT · TypeScript

preflightOrExit

PerryTS/perry · example-code/forgejo-deployment/main.ts:92

async function preflightOrExit(httpPort: number, sshPort: number): Promise<void> {
  const backend = getBackend();
  if (backend === 'unknown' || backend === '') {
    console.error(
      '❌ No container runtime detected. Install one of:\n' +
      '   • apple/container (macOS)  — brew install container\n' +
      '   • orbstack         (macOS) — brew install orbstack\n' +
      '   • podman           (any)   — https://podman.io\n' +
      '   • docker / colima  (any)   — https://docs.docker.com / brew install colima'
    );
    process.exit(2);
  }
  console.log(`🔧 Backend: ${backend}`);

  for (const p of [httpPort, sshPort]) {
    if (p < 1 || p > 65535) {
      console.error(`❌ Invalid port: ${p}`);
      process.exit(2);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…