aboutsummaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorBryan Drewery <bdrewery@FreeBSD.org>2013-03-28 11:05:28 +0000
committerBryan Drewery <bdrewery@FreeBSD.org>2013-03-28 11:05:28 +0000
commit9b3f2ef5eb2e12a96349efdd6caf742659c469b4 (patch)
treeb8dc1eb6638cdc385a4ac96f5bd46979748c110c /Tools
parente9f7c76c37be75af3d88ade9f34f418938c23194 (diff)
downloadports-9b3f2ef5eb2e12a96349efdd6caf742659c469b4.tar.gz
ports-9b3f2ef5eb2e12a96349efdd6caf742659c469b4.zip
Notes
Diffstat (limited to 'Tools')
-rw-r--r--Tools/scripts/dialog4ports.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/Tools/scripts/dialog4ports.sh b/Tools/scripts/dialog4ports.sh
index 4954650d86f2..18897a267d8e 100644
--- a/Tools/scripts/dialog4ports.sh
+++ b/Tools/scripts/dialog4ports.sh
@@ -36,4 +36,13 @@ if ! [ -e $DIALOG4PORTS ]; then
fi
fi
-exec $DIALOG4PORTS 2> $OPTIONSFILE >&2
+# Backwards compat with older version which used stdout [<= 0.1.1] (or stderr [0.1.2]).
+# Clear environment of PKGNAME or the dialog will show on older versions
+# that do not understand -v.
+if ! env -u PKGNAME ${DIALOG4PORTS} -v > /dev/null 2>&1; then
+ exec $DIALOG4PORTS > $OPTIONSFILE 2>&1
+fi
+
+# Newer versions use stderr to work around a jail issue
+# http://lists.freebsd.org/pipermail/freebsd-ports/2013-March/082383.html
+exec $DIALOG4PORTS 2> $OPTIONSFILE