summaryrefslogtreecommitdiffstats
path: root/tools/download_file.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/download_file.py')
-rwxr-xr-xtools/download_file.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/download_file.py b/tools/download_file.py
index f86fd3e034..936bcef32c 100755
--- a/tools/download_file.py
+++ b/tools/download_file.py
@@ -17,7 +17,7 @@ from __future__ import print_function
import argparse
from hashlib import sha1
-from os import link, makedirs, path, remove
+from os import environ, link, makedirs, path, remove
import shutil
from subprocess import check_call, CalledProcessError
from sys import stderr
@@ -25,7 +25,10 @@ from util import hash_file, resolve_url
from zipfile import ZipFile, BadZipfile, LargeZipFile
GERRIT_HOME = path.expanduser('~/.gerritcodereview')
-CACHE_DIR = path.join(GERRIT_HOME, 'bazel-cache', 'downloaded-artifacts')
+CACHE_DIR = environ.get(
+ 'GERRIT_CACHE_HOME',
+ path.join(GERRIT_HOME, 'bazel-cache', 'downloaded-artifacts'))
+
LOCAL_PROPERTIES = 'local.properties'