Skip to content

Commit 3a5b2b9

Browse files
author
jantje
committed
#1073 only replace variables once to avoid endless loops
1 parent fb07bd4 commit 3a5b2b9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

io.sloeber.core/src/io/sloeber/core/tools/Helpers.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -876,8 +876,8 @@ private static void setTheEnvironmentVariablesPostProcessing(IContributedEnviron
876876
// as I'm not, therefore I mod the tools in the command to be
877877
// FQN
878878
if (name.startsWith("A.TOOLS.")) {
879-
String skipVars[]={"A.NETWORK.PASSWORD","A.NETWORK.PORT"};
880-
List<String> skipVarslist=Arrays.asList(skipVars);
879+
String skipVars[]={"A.NETWORK.PASSWORD","A.NETWORK.PORT","A.UPLOAD.VERBOSE","A.NETWORK.AUTH"};
880+
List<String> skipVarslist=new ArrayList<String>(Arrays.asList(skipVars));
881881
String toolID = curVariable.getName().split("\\.")[2];
882882
String recipe = curVariable.getValue();
883883
int indexOfVar = recipe.indexOf("${A.");
@@ -889,7 +889,8 @@ private static void setTheEnvironmentVariablesPostProcessing(IContributedEnviron
889889
String replaceVar = "A.TOOLS." + toolID.toUpperCase() + foundSuffix;
890890
if( !skipVarslist.contains(foundVar)) {
891891
if (contribEnv.getVariable(foundVar, confDesc) == null) {// $NON-NLS-1$
892-
recipe = recipe.replaceAll(foundVar, replaceVar);
892+
recipe = recipe.replace(foundVar, replaceVar);
893+
skipVarslist.add(replaceVar);
893894
}
894895
}
895896
}

0 commit comments

Comments
 (0)