tests: avoid a spurious failure on MSYS
[platform/upstream/automake.git] / lib / tap-driver.sh
index c011298..19aa531 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011-2013 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -115,7 +115,10 @@ else
   init_colors=''
 fi
 
-{
+# :; is there to work around a bug in bash 3.2 (and earlier) which
+# does not always set '$?' properly on redirection failure.
+# See the Autoconf manual for more details.
+:;{
   (
     # Ignore common signals (in this subshell only!), to avoid potential
     # problems with Korn shells.  Some Korn shells are known to propagate