From patchwork Wed Oct 2 18:28:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Baines X-Patchwork-Id: 15582 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id AFE60174A6; Wed, 2 Oct 2019 19:29:11 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 5D597174A5 for ; Wed, 2 Oct 2019 19:29:11 +0100 (BST) Received: from localhost ([::1]:58408 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFjN8-0004oO-RY for patchwork@mira.cbaines.net; Wed, 02 Oct 2019 14:29:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48090) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFjN2-0004nz-AI for guix-patches@gnu.org; Wed, 02 Oct 2019 14:29:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFjN0-00041h-TS for guix-patches@gnu.org; Wed, 02 Oct 2019 14:29:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:57701) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iFjN0-00041U-8l for guix-patches@gnu.org; Wed, 02 Oct 2019 14:29:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iFjN0-0007LC-4S for guix-patches@gnu.org; Wed, 02 Oct 2019 14:29:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#37587] [PATCH 2/2] inferior: Set the error port when using older Guix versions. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 02 Oct 2019 18:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37587 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 37587@debbugs.gnu.org Received: via spool by 37587-submit@debbugs.gnu.org id=B37587.157004090028155 (code B ref 37587); Wed, 02 Oct 2019 18:29:02 +0000 Received: (at 37587) by debbugs.gnu.org; 2 Oct 2019 18:28:20 +0000 Received: from localhost ([127.0.0.1]:38288 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iFjMK-0007Jx-80 for submit@debbugs.gnu.org; Wed, 02 Oct 2019 14:28:20 -0400 Received: from mira.cbaines.net ([212.71.252.8]:43102) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iFjMH-0007Jh-FM for 37587@debbugs.gnu.org; Wed, 02 Oct 2019 14:28:18 -0400 Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id 6FB01174A5 for <37587@debbugs.gnu.org>; Wed, 2 Oct 2019 19:28:16 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id f88e6464 for <37587@debbugs.gnu.org>; Wed, 2 Oct 2019 18:28:16 +0000 (UTC) From: Christopher Baines Date: Wed, 2 Oct 2019 19:28:16 +0100 Message-Id: <20191002182816.14051-2-mail@cbaines.net> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191002182816.14051-1-mail@cbaines.net> References: <20191002182816.14051-1-mail@cbaines.net> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches This makes the behaviour more consistent. * guix/inferior.scm (inferior-pipe): Wrap the second open-pipe* call with with-error-to-port, to match the first call to open-pipe*. --- guix/inferior.scm | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/guix/inferior.scm b/guix/inferior.scm index eecdbdd5ca..b8e2f21f42 100644 --- a/guix/inferior.scm +++ b/guix/inferior.scm @@ -125,19 +125,21 @@ it's an old Guix." ;; Older versions of Guix didn't have a 'guix repl' command, so ;; emulate it. - (open-pipe* OPEN_BOTH "guile" - "-L" (string-append directory "/share/guile/site/" - (effective-version)) - "-C" (string-append directory "/share/guile/site/" - (effective-version)) - "-C" (string-append directory "/lib/guile/" - (effective-version) "/site-ccache") - "-c" - (object->string - `(begin - (primitive-load ,(search-path %load-path - "guix/repl.scm")) - ((@ (guix repl) machine-repl)))))) + (with-error-to-port error-port + (lambda () + (open-pipe* OPEN_BOTH "guile" + "-L" (string-append directory "/share/guile/site/" + (effective-version)) + "-C" (string-append directory "/share/guile/site/" + (effective-version)) + "-C" (string-append directory "/lib/guile/" + (effective-version) "/site-ccache") + "-c" + (object->string + `(begin + (primitive-load ,(search-path %load-path + "guix/repl.scm")) + ((@ (guix repl) machine-repl)))))))) pipe))) (define* (port->inferior pipe #:optional (close close-port))