Mark H Weaver <m...@netris.org> writes: > rek...@elephly.net (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