Skip to content

Commit

Permalink
fix: only create debug on env var
Browse files Browse the repository at this point in the history
fix: only create debug on env var
  • Loading branch information
dlvhdr authored Sep 25, 2024
2 parents 986291b + 2427061 commit b85fafb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,10 @@ func main() {
}
}

logger, _ := tea.LogToFile("debug.log", "debug")
defer logger.Close()
if os.Getenv("DEBUG") == "true" {
logger, _ := tea.LogToFile("debug.log", "debug")
defer logger.Close()
}

input := ansi.Strip(b.String())
p := tea.NewProgram(newModel(input), tea.WithMouseAllMotion())
Expand Down

0 comments on commit b85fafb

Please sign in to comment.