@@ -5,7 +5,7 @@ import * as path from "path";
55import * as vscode from 'vscode' ;
66import { LanguageClient , LanguageClientOptions , RevealOutputChannelOn , ServerOptions , StreamInfo } from "vscode-languageclient/node" ;
77import { LOG } from './util/logger' ;
8- import { isOSUnixoid , correctScriptName } from './util/osUtils' ;
8+ import { isOSUnixoid , correctScriptName , isOSWindows } from './util/osUtils' ;
99import { ServerDownloader } from './serverDownloader' ;
1010import { JarClassContentProvider } from "./jarClassContentProvider" ;
1111import { KotlinApi } from "./lspExtensions" ;
@@ -222,7 +222,7 @@ function createLanguageClient(options: {
222222 command : options . startScriptPath ,
223223 args : [ ] ,
224224 options : {
225- shell : true ,
225+ shell : isOSWindows ( ) ,
226226 cwd : vscode . workspace . workspaceFolders ?. [ 0 ] ?. uri ?. fsPath ,
227227 env : options . env
228228 } // TODO: Support multi-root workspaces (and improve support for when no available is available)
@@ -248,7 +248,7 @@ export function spawnLanguageServerProcessAndConnectViaTcp(options: {
248248 // Wait for the first client to connect
249249 server . listen ( options . tcpPort , ( ) => {
250250 const tcpPort = ( server . address ( ) as net . AddressInfo ) . port . toString ( ) ;
251- const proc = child_process . spawn ( options . startScriptPath , [ "--tcpClientPort" , tcpPort ] , { shell : true } ) ;
251+ const proc = child_process . spawn ( options . startScriptPath , [ "--tcpClientPort" , tcpPort ] , { shell : isOSWindows ( ) } ) ;
252252 LOG . info ( "Creating client at {} via TCP port {}" , options . startScriptPath , tcpPort ) ;
253253
254254 const outputCallback = data => options . outputChannel . append ( `${ data } ` ) ;
0 commit comments