File tree Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -197,18 +197,24 @@ for PACKAGE in $(go list -m -json all | jq -r .Path | sort -f); do
197
197
continue
198
198
fi
199
199
# Skip a directory if 1) it has no files and 2) all the subdirectories contain a go.mod file.
200
- if [[ -z " $( find " ${DEPS_DIR} /${PACKAGE} /" -mindepth 1 -maxdepth 1 -type f) " ]]; then
201
- misses_go_mod=false
200
+ misses_go_mod=false
201
+ DEPS_SUBDIR=" ${DEPS_DIR} /${PACKAGE} "
202
+ search_for_mods () {
203
+ if [[ -z " $( find " ${DEPS_SUBDIR} /" -mindepth 1 -maxdepth 1 -type f) " ]]; then
202
204
while read -d " " -r SUBDIR; do
203
205
if [[ ! -e " ${SUBDIR} /go.mod" ]]; then
204
- misses_go_mod=true
205
- break
206
+ DEPS_SUBDIR= ${SUBDIR}
207
+ search_for_mods
206
208
fi
207
- done < <( find " ${DEPS_DIR} /${PACKAGE} /" -mindepth 1 -maxdepth 1 -type d -print0)
208
- if [[ $misses_go_mod = false ]]; then
209
- echo " ${PACKAGE} has no files, skipping" >&2
210
- continue
211
- fi
209
+ done < <( find " ${DEPS_SUBDIR} /" -mindepth 1 -maxdepth 1 -type d -print0)
210
+ else
211
+ misses_go_mod=true
212
+ fi
213
+ }
214
+ search_for_mods
215
+ if [[ $misses_go_mod = false ]]; then
216
+ echo " ${PACKAGE} has no files, skipping" >&2
217
+ continue
212
218
fi
213
219
echo " ${PACKAGE} "
214
220
You can’t perform that action at this time.
0 commit comments