Skip to content

Commit b1c6624

Browse files
committed
Don't reclaim Docker space on Windows
See gh-42776
1 parent f269a19 commit b1c6624

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

buildSrc/src/main/java/org/springframework/boot/build/test/DockerTestPlugin.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ private Provider<Exec> createReclaimDockerSpaceTask(Project project,
123123
task.setGroup(LifecycleBasePlugin.VERIFICATION_GROUP);
124124
task.setDescription("Reclaims Docker space on CI.");
125125
task.shouldRunAfter(DOCKER_TEST_TASK_NAME);
126-
task.onlyIf(this::runningOnCi);
126+
task.onlyIf(this::shouldReclaimDockerSpace);
127127
task.executable("sh");
128128
task.args("-c",
129129
project.getRootDir()
@@ -133,7 +133,10 @@ private Provider<Exec> createReclaimDockerSpaceTask(Project project,
133133
});
134134
}
135135

136-
private boolean runningOnCi(Task task) {
136+
private boolean shouldReclaimDockerSpace(Task task) {
137+
if (System.getProperty("os.name").startsWith("Windows")) {
138+
return false;
139+
}
137140
return System.getenv("GITHUB_ACTIONS") != null || System.getenv("RECLAIM_DOCKER_SPACE") != null;
138141
}
139142

0 commit comments

Comments
 (0)