mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[intellij sh] IDEA-283506 Properly handle setting env variables for scripts at run configuration
GitOrigin-RevId: e8f86160b04612c49e165d8c2a0f52414f783f25
This commit is contained in:
committed by
intellij-monorepo-bot
parent
14398ed768
commit
03709e0c05
@@ -209,9 +209,12 @@ final class ShRunConfigurationProfileState implements RunProfileState {
|
||||
String escapedValue = StringUtil.escapeQuotes(value);
|
||||
quotedString = StringUtil.containsWhitespaces(value) ? StringUtil.QUOTER.apply(escapedValue) : escapedValue;
|
||||
}
|
||||
if (endWithSemicolon && index == envs.size() - 1) {
|
||||
commandLine.add(key + "=" + quotedString + ";");
|
||||
} else {
|
||||
if (endWithSemicolon) {
|
||||
String semicolon = "";
|
||||
if (index == envs.size() - 1) semicolon = ";";
|
||||
commandLine.add("export " + key + "=" + quotedString + semicolon);
|
||||
}
|
||||
else {
|
||||
commandLine.add(key + "=" + quotedString);
|
||||
}
|
||||
index++;
|
||||
|
||||
Reference in New Issue
Block a user