unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Christopher Baines <mail@cbaines.net>
To: Efraim Flashner <efraim@flashner.co.il>
Cc: guix-devel@gnu.org
Subject: Re: 01/01: build-system/ruby: Use invoke.
Date: Thu, 28 Mar 2019 18:14:48 +0000	[thread overview]
Message-ID: <87k1gikgrr.fsf@cbaines.net> (raw)
In-Reply-To: <20190328171805.4F33A20496@vcs0.savannah.gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1931 bytes --]


guix-commits@gnu.org writes:

> efraim pushed a commit to branch staging
> in repository guix.
>
> commit 0244952c11c0409597fce5c39dfbcafdfd2ea651
> Author: Efraim Flashner <efraim@flashner.co.il>
> Date:   Thu Mar 28 19:17:34 2019 +0200
>
>     build-system/ruby: Use invoke.
>
>     * guix/build/ruby-build-system.scm (install): Use invoke.
> ---
>  guix/build/ruby-build-system.scm | 15 +++++++--------
>  1 file changed, 7 insertions(+), 8 deletions(-)
>
> diff --git a/guix/build/ruby-build-system.scm b/guix/build/ruby-build-system.scm
> index ba0de12..49400b2 100644
> --- a/guix/build/ruby-build-system.scm
> +++ b/guix/build/ruby-build-system.scm
> @@ -143,14 +143,13 @@ GEM-FLAGS are passed to the 'gem' invokation, if present."
>           (gem-dir (string-append vendor-dir "/gems/" gem-name)))
>      (setenv "GEM_VENDOR" vendor-dir)
>
> -    (or (zero?
> -         (apply system* "gem" "install" gem-file
> -                "--verbose"
> -                "--local" "--ignore-dependencies" "--vendor"
> -                ;; Executables should go into /bin, not
> -                ;; /lib/ruby/gems.
> -                "--bindir" (string-append out "/bin")
> -                gem-flags))
> +    (or (apply invoke "gem" "install" gem-file
> +               "--verbose"
> +               "--local" "--ignore-dependencies" "--vendor"
> +               ;; Executables should go into /bin, not
> +               ;; /lib/ruby/gems.
> +               "--bindir" (string-append out "/bin")
> +               gem-flags)
>          (begin
>            (let ((failed-output-dir (string-append (getcwd) "/out")))
>              (mkdir failed-output-dir)

Hey Efraim,

Given that invoke raises an exception, I doubt the custom error handling
code here will ever be executed.

I guess you could change it to catch the exception, but using system*
and looking at the exit code seems pretty reasonable to me. What do you
think?

Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]

       reply	other threads:[~2019-03-28 18:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190328171804.26056.98950@vcs0.savannah.gnu.org>
     [not found] ` <20190328171805.4F33A20496@vcs0.savannah.gnu.org>
2019-03-28 18:14   ` Christopher Baines [this message]
2019-03-28 18:17     ` 01/01: build-system/ruby: Use invoke Efraim Flashner
2019-03-29  9:05       ` Christopher Baines

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k1gikgrr.fsf@cbaines.net \
    --to=mail@cbaines.net \
    --cc=efraim@flashner.co.il \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).