mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
virTestSetEnvPath: Avoid clearing out PATH
If the abs_builddir path already is in PATH and it's in the first position, due to a bug in our code PATH would be cleared out. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
d715bfac08
commit
ee70fe7e14
@ -822,7 +822,8 @@ virTestSetEnvPath(void)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (setenv("PATH", new_path, 1) < 0)
|
||||
if (new_path &&
|
||||
setenv("PATH", new_path, 1) < 0)
|
||||
goto cleanup;
|
||||
|
||||
ret = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user