From 8be763ffb408768a01457d49cc44269a0c7d12a3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?=
 <grubba@grubba.org>
Date: Mon, 25 Sep 2017 11:39:15 +0200
Subject: [PATCH] mkpackage: Fix propagation of extra platform test error code.

Reorder the assignments of EXIT and EXITCODE, so that the
assignment of EXIT doesn't clear $? before it is used for
the assignment of EXITCODE.

Fixes [PIKE-40].
---
 bin/mkpackage.pike | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/mkpackage.pike b/bin/mkpackage.pike
index d6bd7bb11b..ce2576f0e4 100644
--- a/bin/mkpackage.pike
+++ b/bin/mkpackage.pike
@@ -245,8 +245,8 @@ class Package
     if (extra_platform_test) {
       setup +=     ("if ./" + basename(extra_platform_test) + "\n"
 		    "then :; else\n"
-		    "  EXIT=yes\n"
 		    "  EXITCODE=$?\n"
+		    "  EXIT=yes\n"
 		    "fi\n");
     }
     setup +=       ("if [ $EXIT = no ]\n"
-- 
GitLab