Export internal PATH variable (RHBZ#1467878).
authorMark Huth <mhuth@redhat.com>
Wed, 5 Jul 2017 11:11:32 +0000 (21:11 +1000)
committerRichard W.M. Jones <rjones@redhat.com>
Wed, 5 Jul 2017 13:06:57 +0000 (14:06 +0100)
- Fixes virt-what failing if it's started without an environment, eg:
  $ env -i /sbin/virt-what
  ... or with python subprocess.Popen, eg:
  p = subprocess.Popen('/sbin/virt-what', shell=False, ... , env={})

virt-what.in

index 39afedb..64ab770 100644 (file)
@@ -74,6 +74,7 @@ test $# -gt 0 && fail "extra operand '$1'"
 prefix=@prefix@
 exec_prefix=@exec_prefix@
 PATH="${root}@libexecdir@:${root}/sbin:${root}/usr/sbin:${PATH}"
+export PATH
 
 # Check we're running as root.
 EFFUID=$(id -u) || fail "failed to get current user id"