tests: Avoid spurious error message on platforms without mktemp program.
authorBruno Haible <bruno@clisp.org>
Mon, 5 Dec 2011 01:58:55 +0000 (02:58 +0100)
committerIan Beckwith <ianb@erislabs.net>
Sun, 11 Dec 2011 06:43:01 +0000 (06:43 +0000)
* tests/init.sh (mktempd_): Run mktemp in a subcommand.
(cherry picked from commit c69114d48295481373ee197c72214877b909414e)

ChangeLog
tests/init.sh

index cabef93..9891f8e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-12-04  Bruno Haible  <bruno@clisp.org>
+           Jim Meyering  <meyering@redhat.com>
+
+       tests: Avoid spurious error message on platforms without mktemp program.
+       * tests/init.sh (mktempd_): Run mktemp in a subcommand.
+
 2011-12-03  Bruno Haible  <bruno@clisp.org>
 
        Fix module descriptions syntax.
index e2f6119..19c0cf4 100644 (file)
@@ -521,7 +521,7 @@ mktempd_ ()
   esac
 
   # First, try to use mktemp.
-  d=`unset TMPDIR; mktemp -d -t -p "$destdir_" "$template_" 2>/dev/null` \
+  d=`unset TMPDIR; { mktemp -d -t -p "$destdir_" "$template_"; } 2>/dev/null` \
     || fail=1
 
   # The resulting name must be in the specified directory.