@@ -107,7 +107,7 @@ function connectToSbt(coursierPath: string): Thenable<rpc.MessageConnection> {
107
107
sbtStatusBar . show ( )
108
108
109
109
return offeringToRetry ( ( ) => {
110
- return withSbtInstance ( outputChannel , coursierPath ) . then ( connection => {
110
+ return withSbtInstance ( coursierPath ) . then ( connection => {
111
111
markSbtUp ( )
112
112
const interval = setInterval ( ( ) => checkSbt ( interval , connection , coursierPath ) , sbtCheckIntervalMs )
113
113
return connection
@@ -221,7 +221,7 @@ function runLanguageServer(coursierPath: string, languageServerArtifactFile: str
221
221
} )
222
222
}
223
223
224
- function startNewSbtInstance ( log : vscode . OutputChannel , coursierPath : string ) {
224
+ function startNewSbtInstance ( coursierPath : string ) {
225
225
fetchWithCoursier ( coursierPath , sbtArtifact ) . then ( ( sbtClasspath ) => {
226
226
sbtProcess = cpp . spawn ( "java" , [
227
227
"-Dsbt.log.noformat=true" ,
@@ -234,25 +234,25 @@ function startNewSbtInstance(log: vscode.OutputChannel, coursierPath: string) {
234
234
sbtProcess . stdin . end ( )
235
235
236
236
sbtProcess . stdout . on ( 'data' , data => {
237
- log . append ( data . toString ( ) )
237
+ outputChannel . append ( data . toString ( ) )
238
238
} )
239
239
sbtProcess . stderr . on ( 'data' , data => {
240
- log . append ( data . toString ( ) )
240
+ outputChannel . append ( data . toString ( ) )
241
241
} )
242
242
} )
243
243
}
244
244
245
245
/**
246
246
* Connects to an existing sbt server, or boots up one instance and connects to it.
247
247
*/
248
- function withSbtInstance ( log : vscode . OutputChannel , coursierPath : string ) : Thenable < rpc . MessageConnection > {
248
+ function withSbtInstance ( coursierPath : string ) : Thenable < rpc . MessageConnection > {
249
249
const serverSocketInfo = path . join ( workspaceRoot , "project" , "target" , "active.json" )
250
250
251
251
if ( ! fs . existsSync ( serverSocketInfo ) ) {
252
- startNewSbtInstance ( log , coursierPath )
252
+ startNewSbtInstance ( coursierPath )
253
253
}
254
254
255
- return sbtserver . connectToSbtServer ( log )
255
+ return sbtserver . connectToSbtServer ( outputChannel )
256
256
}
257
257
258
258
function fetchWithCoursier ( coursierPath : string , artifact : string , extra : string [ ] = [ ] ) {
0 commit comments