argument('identifier'); $force = (bool) $this->option('force'); $source = (string) $this->option('source'); if (! in_array($source, ['auto', 'bundled', 'github'], true)) { $this->error("알 수 없는 --source 값: {$source} (auto|bundled|github 중 선택)"); return self::FAILURE; } $pack = $this->service->findByIdentifier($identifier); if (! $pack) { $this->error("언어팩을 찾을 수 없습니다: {$identifier}"); return self::FAILURE; } try { $fromVersion = $pack->version; // source=bundled 는 force 와 동등 (bundled 1순위 강제). source=github 는 force 무시. $effectiveForce = $force || $source === 'bundled'; $updated = $this->service->performUpdate($pack, $effectiveForce); $this->info(sprintf( '언어팩 업데이트 완료: %s (%s → %s)', $updated->identifier, $fromVersion, $updated->version, )); return self::SUCCESS; } catch (Throwable $e) { $this->error('언어팩 업데이트 실패: '.$e->getMessage()); return self::FAILURE; } } }