@@ -121,7 +121,7 @@ function connectToSbt(coursierPath: string): Thenable<rpc.MessageConnection> {
121121 sbtStatusBar . show ( )
122122
123123 return offeringToRetry ( ( ) => {
124- return withSbtInstance ( outputChannel , coursierPath ) . then ( connection => {
124+ return withSbtInstance ( coursierPath ) . then ( connection => {
125125 markSbtUp ( )
126126 const interval = setInterval ( ( ) => checkSbt ( interval , connection , coursierPath ) , sbtCheckIntervalMs )
127127 return connection
@@ -235,7 +235,7 @@ function runLanguageServer(coursierPath: string, languageServerArtifactFile: str
235235 } )
236236}
237237
238- function startNewSbtInstance ( log : vscode . OutputChannel , coursierPath : string ) {
238+ function startNewSbtInstance ( coursierPath : string ) {
239239 fetchWithCoursier ( coursierPath , sbtArtifact ) . then ( ( sbtClasspath ) => {
240240 sbtProcess = cpp . spawn ( "java" , [
241241 "-Dsbt.log.noformat=true" ,
@@ -248,25 +248,25 @@ function startNewSbtInstance(log: vscode.OutputChannel, coursierPath: string) {
248248 sbtProcess . stdin . end ( )
249249
250250 sbtProcess . stdout . on ( 'data' , data => {
251- log . append ( data . toString ( ) )
251+ outputChannel . append ( data . toString ( ) )
252252 } )
253253 sbtProcess . stderr . on ( 'data' , data => {
254- log . append ( data . toString ( ) )
254+ outputChannel . append ( data . toString ( ) )
255255 } )
256256 } )
257257}
258258
259259/**
260260 * Connects to an existing sbt server, or boots up one instance and connects to it.
261261 */
262- function withSbtInstance ( log : vscode . OutputChannel , coursierPath : string ) : Thenable < rpc . MessageConnection > {
262+ function withSbtInstance ( coursierPath : string ) : Thenable < rpc . MessageConnection > {
263263 const serverSocketInfo = path . join ( workspaceRoot , "project" , "target" , "active.json" )
264264
265265 if ( ! fs . existsSync ( serverSocketInfo ) ) {
266- startNewSbtInstance ( log , coursierPath )
266+ startNewSbtInstance ( coursierPath )
267267 }
268268
269- return sbtserver . connectToSbtServer ( log )
269+ return sbtserver . connectToSbtServer ( outputChannel )
270270}
271271
272272function fetchWithCoursier ( coursierPath : string , artifact : string , extra : string [ ] = [ ] ) {
0 commit comments