aboutsummaryrefslogtreecommitdiff
path: root/src/lpm.c
diff options
context:
space:
mode:
authorAdam Harrison <adamdharrison@gmail.com>2023-03-28 19:03:45 -0400
committerAdam Harrison <adamdharrison@gmail.com>2023-03-28 19:03:45 -0400
commit126735cc21e63888fd769f29f5bcc41e3b81e30c (patch)
treef2e48b83d0fcd1eb79f7d988e1d6f87c49093340 /src/lpm.c
parent5a05b1a883c932b539fe905f6bab5b1962601c97 (diff)
downloadlite-xl-plugin-manager-126735cc21e63888fd769f29f5bcc41e3b81e30c.tar.gz
lite-xl-plugin-manager-126735cc21e63888fd769f29f5bcc41e3b81e30c.zip
Suppress the progress bar by default, if we're not connected on a TTY.
Diffstat (limited to 'src/lpm.c')
-rw-r--r--src/lpm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lpm.c b/src/lpm.c
index 48644e4..a21e11f 100644
--- a/src/lpm.c
+++ b/src/lpm.c
@@ -1138,6 +1138,8 @@ int main(int argc, char* argv[]) {
lua_setglobal(L, "VERSION");
lua_pushliteral(L, ARCH_PLATFORM);
lua_setglobal(L, "PLATFORM");
+ lua_pushboolean(L, isatty(fileno(stdout)));
+ lua_setglobal(L, "TTY");
#if _WIN32
lua_pushliteral(L, "\\");
#else