testing: Override user environment PATH in chroot

chroot will capture the user environment's PATH variable, which may be
wrong (e.g. not include /bin:/sbin, as it is on Arch). We should set a
known-working PATH variable in the chroot.
This commit is contained in:
Robin McCorkell 2017-11-27 16:46:22 +00:00 committed by Tobias Brunner
parent 381f6d982c
commit 82b91e113a
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ execute()
# $1 - command to execute
execute_chroot()
{
execute "chroot $LOOPDIR $@"
execute "chroot $LOOPDIR env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin $@"
}
# write green status message to console