ZTS: Interpret env vars in faketty on FreeBSD

This was missed in review. On FreeBSD, script does not understand
environment variables being passed as a command.

Use env to make faketty handle env vars on FreeBSD.

Reviewed-by: Igor Kozhukhov <igor@dilos.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #9981
This commit is contained in:
Ryan Moeller 2020-02-12 16:04:51 -05:00 committed by GitHub
parent 9c536b9a78
commit 834f274fbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -114,6 +114,7 @@ export SYSTEM_FILES_COMMON='arp
export SYSTEM_FILES_FREEBSD='chflags export SYSTEM_FILES_FREEBSD='chflags
compress compress
dumpon dumpon
env
fsck fsck
getextattr getextattr
gpart gpart

View File

@ -3970,7 +3970,7 @@ function stat_size #<path>
function faketty function faketty
{ {
if is_freebsd; then if is_freebsd; then
script -q /dev/null "$@" script -q /dev/null env "$@"
else else
script --return --quiet -c "$*" /dev/null script --return --quiet -c "$*" /dev/null
fi fi