download_bower: download to GERRIT_CACHE_HOME

Similar to Ie4fac83928527e0e71b159b9500983234c2261ac which lets one
relocate download_file.py downloaded artifacts by setting the
`GERRIT_CACHE_HOME` environment variable.

The default behavior is unchanged.

Change-Id: I9e223acff29ed4da6fda39589282a107420b9795
diff --git a/tools/js/download_bower.py b/tools/js/download_bower.py
index 1df4b82..d541b56 100755
--- a/tools/js/download_bower.py
+++ b/tools/js/download_bower.py
@@ -25,8 +25,12 @@
 
 import bowerutil
 
-CACHE_DIR = os.path.expanduser(os.path.join(
-    '~', '.gerritcodereview', 'bazel-cache', 'downloaded-artifacts'))
+CACHE_DIR = os.environ.get(
+    'GERRIT_CACHE_HOME',
+    os.path.expanduser(os.path.join(
+        '~', '.gerritcodereview', 'bazel-cache', 'downloaded-artifacts'
+    ))
+)
 
 
 def bower_cmd(bower, *args):