build: Mark git repos as safe for build

This is not an issue when the build is run as non-privilged user.
Marking these as safe in case where the build may be run as root
or some other user.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
This commit is contained in:
Archana Shinde 2022-07-05 14:58:10 -07:00
parent efdb92366b
commit e57a1c831e

View File

@ -56,6 +56,7 @@ build_clh_from_source() {
repo_dir="${repo_dir//.git}" repo_dir="${repo_dir//.git}"
rm -rf "${repo_dir}" rm -rf "${repo_dir}"
git clone "${cloud_hypervisor_repo}" git clone "${cloud_hypervisor_repo}"
git config --global --add safe.directory "$PWD/repo_dir"
pushd "${repo_dir}" pushd "${repo_dir}"
if [ -n "${cloud_hypervisor_pr}" ]; then if [ -n "${cloud_hypervisor_pr}" ]; then