Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions codeflash/cli_cmds/init_java.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
from codeflash.code_utils.shell_utils import get_shell_rc_path, is_powershell
from codeflash.telemetry.posthog_cf import ph

_cached_theme = None


class JavaBuildTool(Enum):
"""Java build tools."""
Expand Down Expand Up @@ -57,9 +59,11 @@ class JavaSetupInfo:

def _get_theme():
"""Get the CodeflashTheme - imported lazily to avoid circular imports."""
from codeflash.cli_cmds.cmd_init import CodeflashTheme

return CodeflashTheme()
global _cached_theme
if _cached_theme is None:
from codeflash.cli_cmds.cmd_init import CodeflashTheme
_cached_theme = CodeflashTheme()
return _cached_theme


def detect_java_build_tool(project_root: Path) -> JavaBuildTool:
Expand Down
Loading