aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2021-06-07 10:14:14 +0100
committerChristopher Baines <mail@cbaines.net>2021-06-07 10:14:14 +0100
commit4a474176aa7401fa6da1de84d2df5816e33f65b8 (patch)
tree48115ed194f43fb1229adc8b4a10ec15b098bbc6 /scripts
parent9a6a991e302aea5297f73f57e074fa62eb05a58a (diff)
downloadbuild-coordinator-4a474176aa7401fa6da1de84d2df5816e33f65b8.tar
build-coordinator-4a474176aa7401fa6da1de84d2df5816e33f65b8.tar.gz
Ensure there's data in backtraces
Diffstat (limited to 'scripts')
-rw-r--r--scripts/guix-build-coordinator-agent.in7
-rw-r--r--scripts/guix-build-coordinator.in7
2 files changed, 14 insertions, 0 deletions
diff --git a/scripts/guix-build-coordinator-agent.in b/scripts/guix-build-coordinator-agent.in
index f75aaca..c863e9e 100644
--- a/scripts/guix-build-coordinator-agent.in
+++ b/scripts/guix-build-coordinator-agent.in
@@ -133,6 +133,13 @@
(setvbuf (current-output-port) 'line)
(setvbuf (current-error-port) 'line)
+(let ((columns (string->number (or (getenv "COLUMNS") ""))))
+ (setenv "COLUMNS"
+ (number->string
+ (if columns
+ (max 256 columns)
+ 256))))
+
(let ((opts (parse-options %options
%option-defaults
(cdr (program-arguments)))))
diff --git a/scripts/guix-build-coordinator.in b/scripts/guix-build-coordinator.in
index c5c97fd..9760968 100644
--- a/scripts/guix-build-coordinator.in
+++ b/scripts/guix-build-coordinator.in
@@ -25,6 +25,13 @@
(setvbuf (current-output-port) 'line)
(setvbuf (current-error-port) 'line)
+(let ((columns (string->number (or (getenv "COLUMNS") ""))))
+ (setenv "COLUMNS"
+ (number->string
+ (if columns
+ (max 256 columns)
+ 256))))
+
(use-modules (srfi srfi-1)
(srfi srfi-19)
(srfi srfi-37)