Unverified Commit ee407024 authored by Lysandre Debut's avatar Lysandre Debut Committed by GitHub
Browse files

Update location identification (#18834)

parent e4910213
...@@ -41,10 +41,12 @@ jobs: ...@@ -41,10 +41,12 @@ jobs:
run: | run: |
. ~/venv/bin/activate . ~/venv/bin/activate
python setup.py develop python setup.py develop
transformer_loc=$(pip show transformers | grep "Location: " | cut -c11-) transformers_install=$(pip list -e | grep transformers)
transformer_repo_loc=$(pwd .) transformers_install_array=($transformers_install)
if [ "$transformer_loc" != "$transformer_repo_loc/src" ]; then transformers_loc=${transformers_install_array[-1]}
echo "transformers is from $transformer_loc but it shoud be from $transformer_repo_loc/src." transformers_repo_loc=$(pwd .)
if [ "$transformers_loc" != "$transformers_repo_loc" ]; then
echo "transformers is from $transformers_loc but it shoud be from $transformers_repo_loc/src."
echo "A fix is required. Stop testing." echo "A fix is required. Stop testing."
exit 1 exit 1
fi fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment