@@ -107,7 +107,7 @@ function connectToSbt(coursierPath: string): Thenable<rpc.MessageConnection> {
107107 sbtStatusBar . show ( )
108108
109109 return offeringToRetry ( ( ) => {
110- return withSbtInstance ( outputChannel , coursierPath ) . then ( connection => {
110+ return withSbtInstance ( coursierPath ) . then ( connection => {
111111 markSbtUp ( )
112112 const interval = setInterval ( ( ) => checkSbt ( interval , connection , coursierPath ) , sbtCheckIntervalMs )
113113 return connection
@@ -221,7 +221,7 @@ function runLanguageServer(coursierPath: string, languageServerArtifactFile: str
221221 } )
222222}
223223
224- function startNewSbtInstance ( log : vscode . OutputChannel , coursierPath : string ) {
224+ function startNewSbtInstance ( coursierPath : string ) {
225225 fetchWithCoursier ( coursierPath , sbtArtifact ) . then ( ( sbtClasspath ) => {
226226 sbtProcess = cpp . spawn ( "java" , [
227227 "-Dsbt.log.noformat=true" ,
@@ -234,25 +234,25 @@ function startNewSbtInstance(log: vscode.OutputChannel, coursierPath: string) {
234234 sbtProcess . stdin . end ( )
235235
236236 sbtProcess . stdout . on ( 'data' , data => {
237- log . append ( data . toString ( ) )
237+ outputChannel . append ( data . toString ( ) )
238238 } )
239239 sbtProcess . stderr . on ( 'data' , data => {
240- log . append ( data . toString ( ) )
240+ outputChannel . append ( data . toString ( ) )
241241 } )
242242 } )
243243}
244244
245245/**
246246 * Connects to an existing sbt server, or boots up one instance and connects to it.
247247 */
248- function withSbtInstance ( log : vscode . OutputChannel , coursierPath : string ) : Thenable < rpc . MessageConnection > {
248+ function withSbtInstance ( coursierPath : string ) : Thenable < rpc . MessageConnection > {
249249 const serverSocketInfo = path . join ( workspaceRoot , "project" , "target" , "active.json" )
250250
251251 if ( ! fs . existsSync ( serverSocketInfo ) ) {
252- startNewSbtInstance ( log , coursierPath )
252+ startNewSbtInstance ( coursierPath )
253253 }
254254
255- return sbtserver . connectToSbtServer ( log )
255+ return sbtserver . connectToSbtServer ( outputChannel )
256256}
257257
258258function fetchWithCoursier ( coursierPath : string , artifact : string , extra : string [ ] = [ ] ) {
0 commit comments