diff --git a/build.mill b/build.mill index 6b25dedf7592..f70cfd939bb6 100644 --- a/build.mill +++ b/build.mill @@ -147,7 +147,7 @@ object Deps { val junitInterface = ivy"com.github.sbt:junit-interface:0.13.3" val commonsIo = ivy"commons-io:commons-io:2.18.0" val log4j2Core = ivy"org.apache.logging.log4j:log4j-core:2.24.3" - val osLib = ivy"com.lihaoyi::os-lib:0.11.4-M2" + val osLib = ivy"com.lihaoyi::os-lib:0.11.4-M4" val pprint = ivy"com.lihaoyi::pprint:0.9.0" val mainargs = ivy"com.lihaoyi::mainargs:0.7.6" val millModuledefsVersion = "0.11.2" diff --git a/integration/invalidation/run-background/src/RunBackgroundTests.scala b/integration/invalidation/run-background/src/RunBackgroundTests.scala index 090e31585927..b3d8a467d0e6 100644 --- a/integration/invalidation/run-background/src/RunBackgroundTests.scala +++ b/integration/invalidation/run-background/src/RunBackgroundTests.scala @@ -38,20 +38,18 @@ object RunBackgroundTests extends UtestIntegrationTestSuite { eventually { probeLockAvailable(lock) } } test("clean") - integrationTest { tester => - if (!mill.main.client.Util.isWindows) { - import tester._ - val lock = os.temp() - val stop = os.temp() - os.remove(stop) - eval(("foo.runBackground", lock, stop)) - eventually { - !probeLockAvailable(lock) - } + import tester._ + val lock = os.temp() + val stop = os.temp() + os.remove(stop) + eval(("foo.runBackground", lock, stop)) + eventually { + !probeLockAvailable(lock) + } - eval(("clean", "foo.runBackground")) - eventually { - probeLockAvailable(lock) - } + eval(("clean", "foo.runBackground")) + eventually { + probeLockAvailable(lock) } } } diff --git a/main/src/mill/main/MainModule.scala b/main/src/mill/main/MainModule.scala index 28c028676657..23a983aebe1f 100644 --- a/main/src/mill/main/MainModule.scala +++ b/main/src/mill/main/MainModule.scala @@ -498,7 +498,7 @@ trait MainModule extends BaseModule0 { val existing = paths.filter(p => os.exists(p)) Target.log.debug(s"Cleaning ${existing.size} paths ...") - existing.foreach(os.remove.all) + existing.foreach(os.remove.all(_, ignoreErrors = true)) Result.Success(existing.map(PathRef(_))) } }