File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
runner/daemon/src/mill/daemon Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import mill.define.{PathRef, WorkspaceRoot}
77import mill .internal .Colors
88
99import java .io .InputStream
10+ import java .nio .channels .ClosedChannelException
1011import scala .annotation .tailrec
1112import scala .util .Using
1213
@@ -124,8 +125,12 @@ object Watching {
124125 def doWatchFsNotify () = {
125126 Using .resource(os.write.outputStream(watchArgs.serverDir / " fsNotifyWatchLog" )) { watchLog =>
126127 def writeToWatchLog (s : String ): Unit = {
127- watchLog.write(s.getBytes(java.nio.charset.StandardCharsets .UTF_8 ))
128- watchLog.write('\n ' )
128+ try {
129+ watchLog.write(s.getBytes(java.nio.charset.StandardCharsets .UTF_8 ))
130+ watchLog.write('\n ' )
131+ } catch {
132+ case _ : ClosedChannelException => /* do nothing, the file is already closed */
133+ }
129134 }
130135
131136 @ volatile var pathChangesDetected = false
You can’t perform that action at this time.
0 commit comments