diff --git a/plugins/package-managers/bazel/src/funTest/assets/projects/synthetic/bazel/.bazelrc b/plugins/package-managers/bazel/src/funTest/assets/projects/synthetic/bazel/.bazelrc new file mode 100644 index 0000000000000..962c769bcc2b1 --- /dev/null +++ b/plugins/package-managers/bazel/src/funTest/assets/projects/synthetic/bazel/.bazelrc @@ -0,0 +1 @@ +common --disk_cache=/non-existing-dir diff --git a/plugins/package-managers/bazel/src/main/kotlin/Bazel.kt b/plugins/package-managers/bazel/src/main/kotlin/Bazel.kt index cab4123c4b254..73b19a8b7dfe1 100644 --- a/plugins/package-managers/bazel/src/main/kotlin/Bazel.kt +++ b/plugins/package-managers/bazel/src/main/kotlin/Bazel.kt @@ -171,7 +171,10 @@ class Bazel( }.getOrNull() private fun getDependencyGraph(projectDir: File, depDirectives: Map): Set { - val modGraphProcess = run("mod", "graph", "--output", "json", workingDir = projectDir) + val modGraphProcess = run( + "mod", "graph", "--output", "json", "--disk_cache", "\"\"", workingDir = projectDir + ) + val node = JSON.decodeFromString(modGraphProcess.stdout) val devDeps = node.dependencies.filter { depDirectives[it.key]?.devDependency == true }.toSet() val mainDeps = node.dependencies.toSet() - devDeps