diff --git a/plugin/src/main/java/io/snyk/eclipse/plugin/runner/ProcessRunner.java b/plugin/src/main/java/io/snyk/eclipse/plugin/runner/ProcessRunner.java index fdda9f3a..ec7c277d 100644 --- a/plugin/src/main/java/io/snyk/eclipse/plugin/runner/ProcessRunner.java +++ b/plugin/src/main/java/io/snyk/eclipse/plugin/runner/ProcessRunner.java @@ -125,8 +125,11 @@ private void setupProcessBuilderBase(ProcessBuilder pb) { if (token != null && authMethod.equals(Preferences.AUTH_METHOD_OAUTH)) { pb.environment().put(EnvironmentConstants.ENV_INTERNAL_SNYK_OAUTH_ENABLED, "1"); pb.environment().put(EnvironmentConstants.ENV_INTERNAL_OAUTH_TOKEN_STORAGE, token); + pb.environment().remove(EnvironmentConstants.ENV_SNYK_TOKEN); } else { pb.environment().put(EnvironmentConstants.ENV_SNYK_TOKEN, token); + pb.environment().remove(EnvironmentConstants.ENV_INTERNAL_OAUTH_TOKEN_STORAGE); + } String insecure = Preferences.getInstance().getPref(Preferences.INSECURE_KEY); diff --git a/plugin/src/main/java/io/snyk/languageserver/LsRuntimeEnvironment.java b/plugin/src/main/java/io/snyk/languageserver/LsRuntimeEnvironment.java index 1de6058f..812fb49a 100644 --- a/plugin/src/main/java/io/snyk/languageserver/LsRuntimeEnvironment.java +++ b/plugin/src/main/java/io/snyk/languageserver/LsRuntimeEnvironment.java @@ -74,14 +74,6 @@ String getOs() { } public void updateEnvironment(Map env) { - String authToken = Preferences.getInstance().getAuthToken(); - if (authToken != null && !authToken.isBlank()) { - env.put("SNYK_TOKEN", authToken); - } - String endpoint = Preferences.getInstance().getEndpoint(); - if (endpoint != null && !endpoint.isEmpty()) { - env.put("SNYK_API", endpoint); - } addPath(env); addIntegrationInfoToEnv(env); addProxyToEnv(env);