Skip to content

Commit 5214c76

Browse files
fix: remove unnecessary token related env variables (#134)
Co-authored-by: Peter Schäfer <101886095+PeterSchafer@users.noreply.github.com>
1 parent b51671a commit 5214c76

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

plugin/src/main/java/io/snyk/eclipse/plugin/runner/ProcessRunner.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,11 @@ private void setupProcessBuilderBase(ProcessBuilder pb) {
125125
if (token != null && authMethod.equals(Preferences.AUTH_METHOD_OAUTH)) {
126126
pb.environment().put(EnvironmentConstants.ENV_INTERNAL_SNYK_OAUTH_ENABLED, "1");
127127
pb.environment().put(EnvironmentConstants.ENV_INTERNAL_OAUTH_TOKEN_STORAGE, token);
128+
pb.environment().remove(EnvironmentConstants.ENV_SNYK_TOKEN);
128129
} else {
129130
pb.environment().put(EnvironmentConstants.ENV_SNYK_TOKEN, token);
131+
pb.environment().remove(EnvironmentConstants.ENV_INTERNAL_OAUTH_TOKEN_STORAGE);
132+
130133
}
131134

132135
String insecure = Preferences.getInstance().getPref(Preferences.INSECURE_KEY);

plugin/src/main/java/io/snyk/languageserver/LsRuntimeEnvironment.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,6 @@ String getOs() {
7474
}
7575

7676
public void updateEnvironment(Map<String, String> env) {
77-
String authToken = Preferences.getInstance().getAuthToken();
78-
if (authToken != null && !authToken.isBlank()) {
79-
env.put("SNYK_TOKEN", authToken);
80-
}
81-
String endpoint = Preferences.getInstance().getEndpoint();
82-
if (endpoint != null && !endpoint.isEmpty()) {
83-
env.put("SNYK_API", endpoint);
84-
}
8577
addPath(env);
8678
addIntegrationInfoToEnv(env);
8779
addProxyToEnv(env);

0 commit comments

Comments
 (0)