@@ -121,7 +121,7 @@ function connectToSbt(coursierPath: string): Thenable<rpc.MessageConnection> {
121
121
sbtStatusBar . show ( )
122
122
123
123
return offeringToRetry ( ( ) => {
124
- return withSbtInstance ( outputChannel , coursierPath ) . then ( connection => {
124
+ return withSbtInstance ( coursierPath ) . then ( connection => {
125
125
markSbtUp ( )
126
126
const interval = setInterval ( ( ) => checkSbt ( interval , connection , coursierPath ) , sbtCheckIntervalMs )
127
127
return connection
@@ -235,7 +235,7 @@ function runLanguageServer(coursierPath: string, languageServerArtifactFile: str
235
235
} )
236
236
}
237
237
238
- function startNewSbtInstance ( log : vscode . OutputChannel , coursierPath : string ) {
238
+ function startNewSbtInstance ( coursierPath : string ) {
239
239
fetchWithCoursier ( coursierPath , sbtArtifact ) . then ( ( sbtClasspath ) => {
240
240
sbtProcess = cpp . spawn ( "java" , [
241
241
"-Dsbt.log.noformat=true" ,
@@ -248,25 +248,25 @@ function startNewSbtInstance(log: vscode.OutputChannel, coursierPath: string) {
248
248
sbtProcess . stdin . end ( )
249
249
250
250
sbtProcess . stdout . on ( 'data' , data => {
251
- log . append ( data . toString ( ) )
251
+ outputChannel . append ( data . toString ( ) )
252
252
} )
253
253
sbtProcess . stderr . on ( 'data' , data => {
254
- log . append ( data . toString ( ) )
254
+ outputChannel . append ( data . toString ( ) )
255
255
} )
256
256
} )
257
257
}
258
258
259
259
/**
260
260
* Connects to an existing sbt server, or boots up one instance and connects to it.
261
261
*/
262
- function withSbtInstance ( log : vscode . OutputChannel , coursierPath : string ) : Thenable < rpc . MessageConnection > {
262
+ function withSbtInstance ( coursierPath : string ) : Thenable < rpc . MessageConnection > {
263
263
const serverSocketInfo = path . join ( workspaceRoot , "project" , "target" , "active.json" )
264
264
265
265
if ( ! fs . existsSync ( serverSocketInfo ) ) {
266
- startNewSbtInstance ( log , coursierPath )
266
+ startNewSbtInstance ( coursierPath )
267
267
}
268
268
269
- return sbtserver . connectToSbtServer ( log )
269
+ return sbtserver . connectToSbtServer ( outputChannel )
270
270
}
271
271
272
272
function fetchWithCoursier ( coursierPath : string , artifact : string , extra : string [ ] = [ ] ) {
0 commit comments