diff --git a/src/main/java/io/bioimage/modelrunner/apposed/appose/Mamba.java b/src/main/java/io/bioimage/modelrunner/apposed/appose/Mamba.java index b8b0436c..e86f2cb3 100644 --- a/src/main/java/io/bioimage/modelrunner/apposed/appose/Mamba.java +++ b/src/main/java/io/bioimage/modelrunner/apposed/appose/Mamba.java @@ -1348,6 +1348,7 @@ public List checkUninstalledDependenciesInEnv(String envName, List") && dependency.contains("<=") && dependency.contains(",")) { int commaInd = dependency.indexOf(","); @@ -1390,8 +1391,8 @@ public boolean checkDependencyInEnv(String envName, String dependency) throws Ma int lowInd = dependency.indexOf("<="); int minInd = Math.min(Math.min(commaInd, lowInd), highInd); String packName = dependency.substring(0, minInd).trim(); - String minV = dependency.substring(lowInd + 1, lowInd < highInd ? commaInd : dependency.length()); - String maxV = dependency.substring(highInd + 1, lowInd < highInd ? dependency.length() : commaInd); + String maxV = dependency.substring(lowInd + 2, lowInd < highInd ? commaInd : dependency.length()); + String minV = dependency.substring(highInd + 1, lowInd < highInd ? dependency.length() : commaInd); return checkDependencyInEnv(envName, packName, minV, null, true) && checkDependencyInEnv(envName, packName, null, maxV, false); } else if (dependency.contains(">") && dependency.contains("<") && dependency.contains(",")) { int commaInd = dependency.indexOf(","); @@ -1399,8 +1400,8 @@ public boolean checkDependencyInEnv(String envName, String dependency) throws Ma int lowInd = dependency.indexOf("<"); int minInd = Math.min(Math.min(commaInd, lowInd), highInd); String packName = dependency.substring(0, minInd).trim(); - String minV = dependency.substring(lowInd + 1, lowInd < highInd ? commaInd : dependency.length()); - String maxV = dependency.substring(highInd + 1, lowInd < highInd ? dependency.length() : commaInd); + String maxV = dependency.substring(lowInd + 1, lowInd < highInd ? commaInd : dependency.length()); + String minV = dependency.substring(highInd + 1, lowInd < highInd ? dependency.length() : commaInd); return checkDependencyInEnv(envName, packName, minV, maxV, true); } else if (dependency.contains(">")) { int ind = dependency.indexOf(">");