Re: A capture-stdout wrapper procedure in (guix build utils)?

2024-04-23 Thread Fabio Natali
On 2024-04-21, 08:35 -0700, Felix Lechner wrote: > It may be better, however, to finally fix Guile's 'system' and > 'system*' to work with 'with-output-to-string'. [2] Hi Felix, Thanks for getting back to me. Great point re potentially fixing this further up in the "chain", i.e. in Guile. I'll

Re: A capture-stdout wrapper procedure in (guix build utils)?

2024-04-21 Thread Development of GNU Guix and the GNU System distribution.
Hi Fabio, On Sat, Apr 20 2024, Fabio Natali wrote: > do you think it might be worth to add it (or a variation thereof) to > '(guix build utils)'? I use this [1] which gives the caller access to the exit status and is also slightly shorter: (define (command-with-output-to-string/status*

A capture-stdout wrapper procedure in (guix build utils)?

2024-04-20 Thread Fabio Natali
Hallo, I noticed this capture-stdout wrapper procedure while reviewing Tomas' patch 68289⁰: , | (define (capture-stdout . prog+args) | (let* ((port (apply open-pipe* OPEN_READ prog+args)) | (data (get-string-all port))) | (if (= 0 (status:exit-val (close-pipe port))) |