File tree Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -136,13 +136,16 @@ for file in **/requirements.txt; do
136
136
137
137
# If no local noxfile exists, copy the one from root
138
138
if [[ ! -f " noxfile.py" ]]; then
139
- PARENT_DIR=$( cd ../ && pwd)
140
- while [[ " $PARENT_DIR " != " $ROOT " && ! -f " $PARENT_DIR /noxfile-template.py" ]];
141
- do
142
- PARENT_DIR=$( dirname " $PARENT_DIR " )
143
- done
144
- cp " $PARENT_DIR /noxfile-template.py" " ./noxfile.py"
145
- echo -e " \n Using noxfile-template from parent folder ($PARENT_DIR ). \n"
139
+ PARENT_DIR=$( cd ../ && pwd)
140
+ while [[ " $PARENT_DIR " != " $ROOT " && ! -f " $PARENT_DIR /noxfile-template.py" ]];
141
+ do
142
+ PARENT_DIR=$( dirname " $PARENT_DIR " )
143
+ done
144
+ cp " $PARENT_DIR /noxfile-template.py" " ./noxfile.py"
145
+ echo -e " \n Using noxfile-template from parent folder ($PARENT_DIR ). \n"
146
+ cleanup_noxfile=1
147
+ else
148
+ cleanup_noxfile=0
146
149
fi
147
150
148
151
# Use nox to execute the tests for the project.
@@ -165,8 +168,10 @@ for file in **/requirements.txt; do
165
168
echo -e " \n Testing completed.\n"
166
169
fi
167
170
168
- # Remove noxfile.py if it's not tracked by git.
169
- git ls-files --error-unmatch noxfile.py > /dev/null 2>&1 | rm noxfile.py
171
+ # Remove noxfile.py if we copied.
172
+ if [[ $cleanup_noxfile -eq 1 ]]; then
173
+ rm noxfile.py
174
+ fi
170
175
171
176
done
172
177
cd " $ROOT "
You can’t perform that action at this time.
0 commit comments