Skip to content

Commit 3b94761

Browse files
YosuaMichaelfacebook-github-bot
authored andcommitted
[fbsync] Fixing issue with setup_env.sh in docker (#6106)
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
1 parent ee557d0 commit 3b94761

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.circleci/unittest/linux/scripts/setup_env.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
set -e
99

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

0 commit comments

Comments
 (0)