Commit a1a742b5 authored by Frédéric Mangano-Tarumi's avatar Frédéric Mangano-Tarumi Committed by Lukas Fleischer
Browse files

aurweb.spawn: Support stdout redirections to non-tty

Only ttys have a terminal size. If we can’t obtain it, we’ll just use 80
as a sane default.

Signed-off-by: Lukas Fleischer's avatarLukas Fleischer <>
parent 445a991e
......@@ -87,12 +87,16 @@ def start():
terminal_width = os.get_terminal_size().columns
except OSError:
terminal_width = 80
"Spawing PHP and FastAPI, then nginx as a reverse proxy.\n"
"Check out {aur_location}\n"
"Hit ^C to terminate everything.\n"
.format(ruler=("-" * os.get_terminal_size().columns),
.format(ruler=("-" * terminal_width),
aur_location=aurweb.config.get('options', 'aur_location')))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment