init.sh: portability fix: use env's POSIX-specified -i option not -u
authorJim Meyering <meyering@redhat.com>
Tue, 6 Apr 2010 15:33:51 +0000 (17:33 +0200)
committerJim Meyering <meyering@redhat.com>
Tue, 6 Apr 2010 15:33:51 +0000 (17:33 +0200)
* tests/init.sh (mktempd_): Use env -i and set PATH explicitly rather
than unportable env -u.  Solaris 5.11's env lacks support for -u.

ChangeLog
tests/init.sh

index 8dca731..60fb413 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-04-06  Jim Meyering  <meyering@redhat.com>
+
+       init.sh: portability fix: use env's POSIX-specified -i option not -u
+       * tests/init.sh (mktempd_): Use env -i and set PATH explicitly rather
+       than unportable env -u.  Solaris 5.11's env lacks support for -u.
+
 2010-04-05  Bruno Haible  <bruno@clisp.org>
 
        btowc: Work around Cygwin 1.7.2 bug.
index 3e3ea44..9b65129 100644 (file)
@@ -306,7 +306,7 @@ mktempd_()
   fail=0
 
   # First, try to use mktemp.
-  d=`env -u TMPDIR mktemp -d -t -p "$destdir_" "$template_" 2>/dev/null` \
+  d=`env -i PATH="$PATH" mktemp -d -t -p "$destdir_" "$template_" 2>/dev/null` \
     || fail=1
 
   # The resulting name must be in the specified directory.