guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 02/02: build-system/r: Use invoke.


From: Mark H Weaver
Subject: Re: 02/02: build-system/r: Use invoke.
Date: Fri, 01 Jun 2018 20:52:39 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Mark H Weaver <address@hidden> writes:

> address@hidden (Ricardo Wurmus) writes:
>
>>  (define (pipe-to-r command params)
>>    (let ((port (apply open-pipe* OPEN_WRITE "R" params)))
>>      (display command port)
>> -    (zero? (status:exit-val (close-pipe port)))))
>> +    (let ((code (status:exit-val (close-pipe port))))
>> +      (unless (zero? code)
>> +        (raise (condition ((@@ (guix build utils) &invoke-error)
>> +                           (program "R")
>> +                           (arguments (string-append params " " command))
>> +                           (exit-status (status:exit-val code))
>> +                           (term-signal (status:term-sig code))
>> +                           (stop-signal (status:stop-sig code)))))))))
>
> The 'arguments' field should be a list, not a string.

Actually, the more serious problem is that 'params' is itself a list, so
when you apply 'string-append' to it, that will raise an exception, but
not the exception that you wanted.

      Mark



reply via email to

[Prev in Thread] Current Thread [Next in Thread]