guix-commits
[Top][All Lists]
Advanced

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

01/01: Revert "build-system/ruby: Use invoke."


From: guix-commits
Subject: 01/01: Revert "build-system/ruby: Use invoke."
Date: Thu, 28 Mar 2019 14:20:04 -0400 (EDT)

efraim pushed a commit to branch staging
in repository guix.

commit 7c86fdda7ceed11377b0e17b47c91598be59be52
Author: Efraim Flashner <address@hidden>
Date:   Thu Mar 28 20:18:02 2019 +0200

    Revert "build-system/ruby: Use invoke."
    
    This reverts commit 0244952c11c0409597fce5c39dfbcafdfd2ea651.
    
    We prefer 'invoke', but the custom error handling works better with the
    code as-is.
---
 guix/build/ruby-build-system.scm | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/guix/build/ruby-build-system.scm b/guix/build/ruby-build-system.scm
index 49400b2..63c9476 100644
--- a/guix/build/ruby-build-system.scm
+++ b/guix/build/ruby-build-system.scm
@@ -143,13 +143,16 @@ 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 (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)
+    (or (zero?
+          ;; 'zero? system*' allows the custom error handling to function as
+          ;; expected, while 'invoke' raises its own exception.
+         (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))
         (begin
           (let ((failed-output-dir (string-append (getcwd) "/out")))
             (mkdir failed-output-dir)



reply via email to

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