diff options
author | Ludovic Courtès <ludo@gnu.org> | 2016-04-15 00:08:28 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2016-04-15 00:32:18 +0200 |
commit | cc44fbb8d9f47070c488faef3dc4b24f2a8a07d8 (patch) | |
tree | e5ceac29045d23019f15ec5aa9a694f53ba4f6f2 /guix/scripts | |
parent | 9703fef4152622fe241d28c82542a3a5a09dec1b (diff) | |
download | gnu-guix-cc44fbb8d9f47070c488faef3dc4b24f2a8a07d8.tar gnu-guix-cc44fbb8d9f47070c488faef3dc4b24f2a8a07d8.tar.gz |
guix download: Honor the number of columns of the terminal.
* guix/scripts/download.scm (guix-download): Parameterize
'current-terminal-columns'.
Diffstat (limited to 'guix/scripts')
-rw-r--r-- | guix/scripts/download.scm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/guix/scripts/download.scm b/guix/scripts/download.scm index 6ebc14f573..1648198f6e 100644 --- a/guix/scripts/download.scm +++ b/guix/scripts/download.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2015 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2012, 2013, 2015, 2016 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -24,6 +24,8 @@ #:use-module (guix utils) #:use-module (guix base32) #:use-module (guix download) + #:use-module ((guix build download) #:select (current-terminal-columns)) + #:use-module ((guix build syscalls) #:select (terminal-columns)) #:use-module (web uri) #:use-module (ice-9 match) #:use-module (srfi srfi-1) @@ -115,8 +117,10 @@ Supported formats: 'nix-base32' (default), 'base32', and 'base16' (add-to-store store (basename (uri-path uri)) #f "sha256" (uri-path uri))) (else - (download-to-store store (uri->string uri) - (basename (uri-path uri)))))) + (parameterize ((current-terminal-columns + (terminal-columns))) + (download-to-store store (uri->string uri) + (basename (uri-path uri))))))) (hash (call-with-input-file (or path (leave (_ "~a: download failed~%") |