diff --git a/ra_aid/proc/interactive.py b/ra_aid/proc/interactive.py index 4d9f8b2..8213057 100644 --- a/ra_aid/proc/interactive.py +++ b/ra_aid/proc/interactive.py @@ -69,7 +69,7 @@ def run_interactive_command(cmd: List[str]) -> Tuple[bytes, int]: except (AttributeError, io.UnsupportedOperation): stdin_fd = None - # Set up environment variables for the subprocess + # Set up environment variables for the subprocess using detected terminal size env = os.environ.copy() env.update({ 'DEBIAN_FRONTEND': 'noninteractive', @@ -78,7 +78,8 @@ def run_interactive_command(cmd: List[str]) -> Tuple[bytes, int]: 'CI': 'true', 'LANG': 'C.UTF-8', 'LC_ALL': 'C.UTF-8', - 'COLUMNS': '120', + 'COLUMNS': str(cols), + 'LINES': str(rows), 'FORCE_COLOR': '1', 'GIT_TERMINAL_PROMPT': '0', 'PYTHONDONTWRITEBYTECODE': '1',