mirror of https://gitee.com/openkylin/libvirt.git
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…
Reference in New Issue