summaryrefslogtreecommitdiff
path: root/src/lib/common.sh
diff options
context:
space:
mode:
authorLevente Polyak <anthraxx@archlinux.org>2024-02-14 01:18:40 +0100
committerLevente Polyak <anthraxx@archlinux.org>2024-02-14 01:28:40 +0100
commit66a4357f3e001d02bbbb45fb247efaa2f505726d (patch)
tree5cd0a32f3edd5e2746e790454966a3bd14338c61 /src/lib/common.sh
parentdb2f82bf19a4eed48a4a315cd308c3c1747d0e73 (diff)
downloaddevtools-66a4357f3e001d02bbbb45fb247efaa2f505726d.tar.xz
fix(common): ensure TERM is always set with a fallback to dumb
This avoids some corner cases that some applications behave ill when TERM is completely unset. Instead, ensure we set TERM to dumb as a fallback, which should serve better than not having any term defined. Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
Diffstat (limited to 'src/lib/common.sh')
-rw-r--r--src/lib/common.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/common.sh b/src/lib/common.sh
index 2d2d16f..ff767c6 100644
--- a/src/lib/common.sh
+++ b/src/lib/common.sh
@@ -31,6 +31,9 @@ export PACKAGING_REPO_RELEASE_HOST=repos.archlinux.org
export PKGBASE_MAINTAINER_URL=https://archlinux.org/packages/pkgbase-maintainer
export AUR_URL_SSH=aur@aur.archlinux.org
+# ensure TERM is set with a fallback to dumb
+export TERM=${TERM:-dumb}
+
# check if messages are to be printed using color
if [[ -t 2 && "$TERM" != dumb ]] || [[ ${DEVTOOLS_COLOR} == always ]]; then
colorize