mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Only spawn WSL detct job on Windows
There is no need to spawn the WSL detect job for other platforms than Windows. Contributed by STMicroelectronics Change-Id: I85256a9f6a4f5e9e9276458ba67e2f6adf02afa7 Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
This commit is contained in:
parent
432ca56fd3
commit
eb7aa70a9f
1 changed files with 47 additions and 43 deletions
|
@ -38,6 +38,12 @@ public class DetectWSL implements IDetectExternalExecutable {
|
|||
private List<Map<String, String>> result = null;
|
||||
private WslDetectJob detectJob = null;
|
||||
|
||||
public DetectWSL() {
|
||||
if (!Platform.OS_WIN32.equals(Platform.getOS())) {
|
||||
result = Collections.emptyList();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasEntries() {
|
||||
return !getEntries().isEmpty();
|
||||
|
@ -95,7 +101,6 @@ public class DetectWSL implements IDetectExternalExecutable {
|
|||
protected IStatus run(IProgressMonitor monitor) {
|
||||
if (result == null) {
|
||||
result = Collections.emptyList();
|
||||
if (Platform.OS_WIN32.equals(Platform.getOS())) {
|
||||
String windir = System.getenv("windir"); //$NON-NLS-1$
|
||||
if (windir == null) {
|
||||
return Status.OK_STATUS;
|
||||
|
@ -142,7 +147,6 @@ public class DetectWSL implements IDetectExternalExecutable {
|
|||
} catch (IOException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
return Status.OK_STATUS;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue