@@ -5,7 +5,7 @@ import * as path from "path";
5
5
import * as vscode from 'vscode' ;
6
6
import { LanguageClient , LanguageClientOptions , RevealOutputChannelOn , ServerOptions , StreamInfo } from "vscode-languageclient/node" ;
7
7
import { LOG } from './util/logger' ;
8
- import { isOSUnixoid , correctScriptName } from './util/osUtils' ;
8
+ import { isOSUnixoid , correctScriptName , isOSWindows } from './util/osUtils' ;
9
9
import { ServerDownloader } from './serverDownloader' ;
10
10
import { JarClassContentProvider } from "./jarClassContentProvider" ;
11
11
import { KotlinApi } from "./lspExtensions" ;
@@ -222,7 +222,7 @@ function createLanguageClient(options: {
222
222
command : options . startScriptPath ,
223
223
args : [ ] ,
224
224
options : {
225
- shell : true ,
225
+ shell : isOSWindows ( ) ,
226
226
cwd : vscode . workspace . workspaceFolders ?. [ 0 ] ?. uri ?. fsPath ,
227
227
env : options . env
228
228
} // TODO: Support multi-root workspaces (and improve support for when no available is available)
@@ -248,7 +248,7 @@ export function spawnLanguageServerProcessAndConnectViaTcp(options: {
248
248
// Wait for the first client to connect
249
249
server . listen ( options . tcpPort , ( ) => {
250
250
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 ( ) } ) ;
252
252
LOG . info ( "Creating client at {} via TCP port {}" , options . startScriptPath , tcpPort ) ;
253
253
254
254
const outputCallback = data => options . outputChannel . append ( `${ data } ` ) ;
0 commit comments