From 0127322ec8e3aa0ec6d4a81b73cc2f0ca68f88c2 Mon Sep 17 00:00:00 2001 From: Tyler Williams Date: Mon, 30 Nov 2020 15:26:19 -0800 Subject: [PATCH] Set cache dir when running sidecar with cache --- cmd/buildbuddy/buildbuddy.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/buildbuddy/buildbuddy.go b/cmd/buildbuddy/buildbuddy.go index 98f6db6..26de988 100644 --- a/cmd/buildbuddy/buildbuddy.go +++ b/cmd/buildbuddy/buildbuddy.go @@ -124,6 +124,9 @@ func main() { } if remoteCacheFlag != "" && remoteExecFlag == "" { sidecarArgs = append(sidecarArgs, remoteCacheFlag) + // Also specify as disk cache directory. + diskCacheDir := filepath.Join(bbHome, "filecache") + sidecarArgs = append(sidecarArgs, fmt.Sprintf("--cache_directory=%s", diskCacheDir)) } if len(sidecarArgs) > 0 {