Skip to content

Commit 74f7665

Browse files
snjezafbricon
authored andcommitted
Exclude ParentProcessWatcher on Windows by default
Signed-off-by: Snjezana Peco <[email protected]>
1 parent 093ff56 commit 74f7665

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/javaServerStarter.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import * as path from 'path';
33
import * as net from 'net';
44
import * as glob from 'glob';
5+
import * as os from 'os';
56
import { StreamInfo, Executable, ExecutableOptions } from 'vscode-languageclient';
67
import { RequirementsData } from './requirements';
78
import { getJavaEncoding } from './settings';
@@ -64,9 +65,11 @@ function prepareParams(requirements: RequirementsData, javaConfiguration, worksp
6465
if (vmargs.indexOf(encodingKey) < 0) {
6566
params.push(encodingKey + getJavaEncoding());
6667
}
67-
const watchParentProcess = '-DwatchParentProcess=';
68-
if (vmargs.indexOf(watchParentProcess) < 0) {
69-
params.push(watchParentProcess + 'false');
68+
if (os.platform() == 'win32') {
69+
const watchParentProcess = '-DwatchParentProcess=';
70+
if (vmargs.indexOf(watchParentProcess) < 0) {
71+
params.push(watchParentProcess + 'false');
72+
}
7073
}
7174

7275
parseVMargs(params, vmargs);

0 commit comments

Comments
 (0)