From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Baines Subject: Re: 01/01: build-system/ruby: Use invoke. Date: Thu, 28 Mar 2019 18:14:48 +0000 Message-ID: <87k1gikgrr.fsf@cbaines.net> References: <20190328171804.26056.98950@vcs0.savannah.gnu.org> <20190328171805.4F33A20496@vcs0.savannah.gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:42710) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h9ZYE-00017H-GO for guix-devel@gnu.org; Thu, 28 Mar 2019 14:14:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h9ZYD-0006w8-IY for guix-devel@gnu.org; Thu, 28 Mar 2019 14:14:54 -0400 Received: from mira.cbaines.net ([2a01:7e00::f03c:91ff:fe69:8da9]:60228) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h9ZYD-0006vO-8J for guix-devel@gnu.org; Thu, 28 Mar 2019 14:14:53 -0400 In-reply-to: <20190328171805.4F33A20496@vcs0.savannah.gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Efraim Flashner Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain guix-commits@gnu.org writes: > efraim pushed a commit to branch staging > in repository guix. > > commit 0244952c11c0409597fce5c39dfbcafdfd2ea651 > Author: Efraim Flashner > 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 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlydDxhfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9Xd0SxAAgpIDzDG+b8teE7Kw8t52Y0zJUrD8TSNzd4HUVHyAqG4wgD1bvOlVdxv1 R6oiRNww4YuZXrmmB2+gLJ7RjF3U3HLgo5HcM/zhA08SCx5VEgB8X394D61lhzfc mV5dnAhBG5Ma1sfhVyVIerhkmP8Vby6iXF3rGGK88IOsRLHLB7wRaWjPgDkSMbYC eXbJBTxYDosFFkwVgquqSlLzgUzOZbgFIdcLmPE1HWRDJG6/A0V6cQ1xkZM7ztA5 Lug94Bi4R604XOiUgr05NZcqWW5oPOYR1utTJTiysWS44aujwqtX0FvRJ3HTeKdN RpJCnDMlLYYZXFzEQzrUbDoHWAfe/cwr6J+koagiIoHjNa5ibU88Y2yXxmzgk44G 948meTE1OecK+xLVf9A7FRK6vWYvuqeEyo1zqGDwWLJGPE4lVDyQFKNSt8po8pG9 AmsZ/+Zh2xD/rzikQAA8c0qB40RlbbCvm2MD57qppTOmvk0RVqhtZDvuNmot5wVT kLn4RDDPeSrDam4ixgoPrYaF8DIXuQRn6VRwsHPN5TnLb/YL6wft4DLJblzdid5Y 8f+dRVG7NKmcFtBKixvNqx9ThPQTAkl7leeD26fig2BUkDxnpFNPvvGZovGZzmg9 fbkPLUoNLRX0/TjTfs5fSfABtQ5h1eDpR5N46+CloasU60ekKnY= =rx95 -----END PGP SIGNATURE----- --=-=-=--