Skip to content

Commit

Permalink
Always make sure module cache is downloaded.
Browse files Browse the repository at this point in the history
This ensures that `go mod download` in tests/scripts to make sure all
dependencies are present. This should generally only be slow on the first
attempt when it needs to download the modules locally, but subsequent calls
should result in no change.

This solves an issue raised in
tektoncd/pipeline#1792 where the license DB used
by a required tool wasn't being downloaded.
  • Loading branch information
wlynch committed Dec 26, 2019
1 parent a403a04 commit c760763
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/presubmit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -378,3 +378,9 @@ function main() {

exit ${failed}
}

# Download module dependencies to the local cache.
# This should only be slow on the first run, and fast on subsequent runs.
# If this command fails for any reason (e.g. not ran in a modules enabled
# repo), always result in true.
go mod download || true

0 comments on commit c760763

Please sign in to comment.