Skip to content
Snippets Groups Projects
Commit c732a845 authored by blackoverlord's avatar blackoverlord
Browse files

fixed an issue with special characters in environment variable names

parent ba172b89
No related branches found
No related tags found
No related merge requests found
......@@ -363,7 +363,7 @@ public class ShellLink {
private static String resolveEnvVariables(String path) {
for (var i : env.entrySet()) {
String p = i.getKey().replace("(", "\\(").replace(")", "\\)");
String p = Pattern.quote(i.getKey());
String r = i.getValue().replace("\\", "\\\\");
path = Pattern.compile("%"+p+"%", Pattern.CASE_INSENSITIVE).matcher(path).replaceAll(r);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment