@@ -111,22 +111,22 @@ object MillMain0 {
111111 outLock : Lock ,
112112 outDir : os.Path
113113 ): (Boolean , RunnerState ) = MappedRoots .withMillDefaults(outPath = outDir) {
114- mill.api.daemon.internal.MillScalaParser .current.withValue(MillScalaParserImpl ) {
115- os.SubProcess .env.withValue(env) {
116- val parserResult = MillCliConfig .parse(args)
117- // Detect when we're running in BSP mode as early as possible,
118- // and ensure we don't log to the default stdout or use the default
119- // stdin, meant to be used for BSP JSONRPC communication, where those
120- // logs would be lost.
121- // This is especially helpful if anything unexpectedly goes wrong
122- // early on, when developing on Mill or debugging things for example.
123- val bspMode = parserResult.toOption.exists(_.bsp.value)
124- withStreams(bspMode, streams0, outDir) { streams =>
125- parserResult match {
126- // Cannot parse args
127- case Result .Failure (msg) =>
128- streams.err.println(msg)
129- (false , RunnerState .empty)
114+ mill.api.daemon.internal.MillScalaParser .current.withValue(MillScalaParserImpl ) {
115+ os.SubProcess .env.withValue(env) {
116+ val parserResult = MillCliConfig .parse(args)
117+ // Detect when we're running in BSP mode as early as possible,
118+ // and ensure we don't log to the default stdout or use the default
119+ // stdin, meant to be used for BSP JSONRPC communication, where those
120+ // logs would be lost.
121+ // This is especially helpful if anything unexpectedly goes wrong
122+ // early on, when developing on Mill or debugging things for example.
123+ val bspMode = parserResult.toOption.exists(_.bsp.value)
124+ withStreams(bspMode, streams0, outDir) { streams =>
125+ parserResult match {
126+ // Cannot parse args
127+ case Result .Failure (msg) =>
128+ streams.err.println(msg)
129+ (false , RunnerState .empty)
130130
131131 case Result .Success (config) if config.help.value =>
132132 streams.out.println(MillCliConfig .longUsageText)
0 commit comments