Skip to content

Commit

Permalink
[fbsync] Fixing issue with setup_env.sh in docker (#6106)
Browse files Browse the repository at this point in the history
Summary:
New version of git checks folder owner and errors with 'fatal: unsafe repository' if owner is different.
Thus, `root_dir="$(git rev-parse --show-toplevel)"` is failing.

To fix the issue, just added all floder as safe directories
git rev-parse --show-toplevel

Reviewed By: NicolasHug

Differential Revision: D36760912

fbshipit-source-id: f2220269833e0cf25beafa71dba84709fe0113e2
  • Loading branch information
YosuaMichael authored and facebook-github-bot committed Jun 1, 2022
1 parent ee557d0 commit 3b94761
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .circleci/unittest/linux/scripts/setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
set -e

this_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
# Avoid error: "fatal: unsafe repository"
git config --global --add safe.directory '*'
root_dir="$(git rev-parse --show-toplevel)"
conda_dir="${root_dir}/conda"
env_dir="${root_dir}/env"
Expand Down

0 comments on commit 3b94761

Please sign in to comment.