about summary refs log tree commit diff stats
path: root/src/main.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2022-11-30 12:33:30 +0100
committerbptato <nincsnevem662@gmail.com>2022-11-30 12:33:30 +0100
commite3943729ea514dcbbb6d7f11f24b40170aa141f2 (patch)
tree7748e07b12e6ca03ce5b3e2c072289b348d47135 /src/main.nim
parent9c2ee92c3d3b3e493908ad67bcc1c82a740b4fed (diff)
downloadchawan-e3943729ea514dcbbb6d7f11f24b40170aa141f2.tar.gz
Disable *_HOME when stdin is a tty
Diffstat (limited to 'src/main.nim')
-rw-r--r--src/main.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.nim b/src/main.nim
index 705063a2..15b5dcb1 100644
--- a/src/main.nim
+++ b/src/main.nim
@@ -99,7 +99,7 @@ while i < params.len:
       pages.add(param)
   inc i
 
-if pages.len == 0:
+if pages.len == 0 and not stdin.isatty():
   let http = getEnv("HTTP_HOME")
   if http != "": pages.add(http)
   else: