Skip to content

Commit 9a46cb9

Browse files
authored
Add workaround for dependency license scan. (#1605)
1 parent 5bafd6a commit 9a46cb9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

scripts/create-licenses.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,15 @@ for PACKAGE in $(go list -m -json all | jq -r .Path | sort -f); do
178178
# echo "$PACKAGE doesn't exist in vendor, skipping" > /dev/stderr
179179
continue
180180
fi
181+
# TODO: samwronski - remove this edge case
182+
# The above if statement skips dependencies which did not get checked out with
183+
# `go mod vendor` however that does not catch this edge case.
184+
# Kpt currently depends on 2 versions of posener. Because v2 *is* checked out
185+
# the directory does exist causing the above check to pass. However this repo
186+
# is not included in the vendor directory so a license will not be found.
187+
if [[ ! -e "github.com/posener/complete" ]]; then
188+
continue
189+
fi
181190

182191
process_content "${PACKAGE}" LICENSE
183192
process_content "${PACKAGE}" COPYRIGHT

0 commit comments

Comments
 (0)