From 45daf1cd375b9835d913f689e1bce2b4fc93ac54 Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Sun, 17 Mar 2024 20:48:51 -0400 Subject: Added in a fix to detect windows consoles from cmd.exe. --- src/lpm.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lpm.lua') diff --git a/src/lpm.lua b/src/lpm.lua index 250e507..1fffb39 100644 --- a/src/lpm.lua +++ b/src/lpm.lua @@ -528,7 +528,7 @@ end local LATEST_MOD_VERSION = "3.0.0" local EXECUTABLE_EXTENSION = PLATFORM == "windows" and ".exe" or "" local HOME, USERDIR, CACHEDIR, JSON, TABLE, HEADER, RAW, VERBOSE, FILTRATION, MOD_VERSION, QUIET, FORCE, REINSTALL, CONFIG, NO_COLOR, AUTO_PULL_REMOTES, ARCH, ASSUME_YES, NO_INSTALL_OPTIONAL, TMPDIR, DATADIR, BINARY, POST, PROGRESS, SYMLINK, REPOSITORY, EPHEMERAL, MASK, settings, repositories, lite_xls, system_bottle, progress_bar_label, write_progress_bar -local SHOULD_COLOR = os.getenv("TERM") and os.getenv("TERM") ~= "dumb" and not os.getenv("NO_COLOR") +local SHOULD_COLOR = (PLATFORM == "windows" or (os.getenv("TERM") and os.getenv("TERM") ~= "dumb")) and not os.getenv("NO_COLOR") local Addon, Repository, LiteXL, Bottle, lpm, log = {}, {}, {}, {}, {}, {} local function engage_locks(func, err, warn) -- cgit v1.2.3