diff --git a/bin/compile b/bin/compile
index 33aafce48a77b1968b107eb1e46fda1b572b86fa..64055941b7802a5cd0aa6c22951fec2a0aa230b5 100755
--- a/bin/compile
+++ b/bin/compile
@@ -146,7 +146,7 @@ bpwatch stop clear_old_venvs
 
 # Restore old artifacts from the cache.
 bpwatch start restore_cache
-  mkdir -p $CACHEDIR/$CACHED_DIR
+  mkdir -p $CACHE_DIR/$CACHED_DIR
   for dir in $CACHED_DIRS; do
     cp -R $CACHE_DIR/$dir . &> /dev/null || true
   done