From b79b43115b47d30753a107ab0496394277f26b17 Mon Sep 17 00:00:00 2001 From: Aaron Feledy Date: Sat, 29 Jul 2023 03:23:02 -0500 Subject: [PATCH] Pass terminal dimensions into container --- legacy/utils.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/legacy/utils.js b/legacy/utils.js index 5cb28a9..93420c4 100644 --- a/legacy/utils.js +++ b/legacy/utils.js @@ -62,9 +62,14 @@ exports.loadComposeFiles = (files, dir) => _(exports.validateFiles(files, dir)) /* * Helper to get default cli envvars */ -exports.getCliEnvironment = (more = {}) => _.merge({}, { - PHP_MEMORY_LIMIT: '-1', -}, more); +exports.getCliEnvironment = (more = {}) => _.merge( + {}, + {PHP_MEMORY_LIMIT: '-1'}, + // Pass terminal dimensions into the container so that tools that rely on them can render properly + process.stdout.columns && {COLUMNS: process.stdout.columns}, + process.stdout.rows && {LINES: process.stdout.rows}, + more, +); /* * Helper to return a valid id from app data