Skip to content

Commit

Permalink
Allow turning on debug mode for own with OWN_DEBUG env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
aNNiMON committed Oct 3, 2024
1 parent 94d0592 commit d98f418
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ownlang-desktop/src/main/resources/scripts/own.own
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std, files, http, json, functional, downloader, robot, java

PB = newClass("java.lang.ProcessBuilder")

DEBUG=false
DEBUG=getenv("OWN_DEBUG", false) == "true"
logger = {}
logger.color = def(num = 0) = sprintf("%s[0%sm", toChar(27), num > 0 ? (";" + num) : "")
logger.error = def(a = "", b = "", c = "") = echo(logger.color(31) + a, b, c + logger.color())
Expand Down

0 comments on commit d98f418

Please sign in to comment.