Skip to content
This repository has been archived by the owner on Mar 3, 2021. It is now read-only.

Commit

Permalink
Clean up temporary directory in golangcilint
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Mohr <rmohr@redhat.com>
  • Loading branch information
rmohr committed Nov 23, 2020
1 parent 53c07f7 commit 8c1a652
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion golangcilint/runner.bash.template
Expand Up @@ -17,6 +17,8 @@ DIRECTORY="$(pwd -P)"
NEW_GOPATH="${DIRECTORY}"
NEW_GOROOT="${DIRECTORY}/${NEW_GOROOT}"
NEW_PATH="${NEW_GOPATH}/external/com_github_atlassian_bazel_tools_golangcilint:${NEW_GOROOT}/bin:${PATH}"
GOCACHE="$(mktemp -d)"
trap "rm -rf '${GOCACHE}'" EXIT

golangcilint_short_path=$(readlink "${GOLANGCILINT_SHORT_PATH}")
CURDIR="${NEW_GOPATH}/src/${PREFIX_DIR_PATH}/${PREFIX_BASE_NAME}"
Expand All @@ -26,7 +28,7 @@ cd "${CURDIR}"
-i \
GOPATH="${NEW_GOPATH}"\
GOROOT="${NEW_GOROOT}"\
GOCACHE="$(mktemp -d)"\
GOCACHE="${GOCACHE}"\
GOLANGCI_LINT_CACHE="$(mktemp -d)"\
PATH="${NEW_PATH}"\
PWD="${CURDIR}"\
Expand Down

0 comments on commit 8c1a652

Please sign in to comment.