File tree Expand file tree Collapse file tree
plugin/src/main/java/io/snyk Expand file tree Collapse file tree Original file line number Diff line number Diff 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 );
Original file line number Diff line number Diff 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 );
You can’t perform that action at this time.
0 commit comments