|
25 | 25 | import com.intellij.execution.ExecutionHelper; |
26 | 26 | import com.intellij.execution.ExecutionModes; |
27 | 27 | import com.intellij.execution.RunContentExecutor; |
28 | | -import com.intellij.execution.configurations.EncodingEnvironmentUtil; |
29 | 28 | import com.intellij.execution.configurations.GeneralCommandLine; |
30 | 29 | import com.intellij.execution.configurations.ParametersList; |
31 | 30 | import com.intellij.execution.configurations.PtyCommandLine; |
@@ -73,7 +72,7 @@ public class GoExecutor { |
73 | 72 | private boolean myShowOutputOnError; |
74 | 73 | private boolean myShowNotificationsOnError; |
75 | 74 | private boolean myShowNotificationsOnSuccess; |
76 | | - private boolean myPassParentEnvironment = true; |
| 75 | + private GeneralCommandLine.ParentEnvironmentType myParentEnvironmentType = GeneralCommandLine.ParentEnvironmentType.CONSOLE; |
77 | 76 | private boolean myPtyDisabled; |
78 | 77 | @Nullable private String myExePath; |
79 | 78 | @Nullable private String myPresentableName; |
@@ -163,7 +162,8 @@ public GoExecutor withExtraEnvironment(@NotNull Map<String, String> environment) |
163 | 162 |
|
164 | 163 | @NotNull |
165 | 164 | public GoExecutor withPassParentEnvironment(boolean passParentEnvironment) { |
166 | | - myPassParentEnvironment = passParentEnvironment; |
| 165 | + myParentEnvironmentType = passParentEnvironment ? GeneralCommandLine.ParentEnvironmentType.CONSOLE |
| 166 | + : GeneralCommandLine.ParentEnvironmentType.NONE; |
167 | 167 | return this; |
168 | 168 | } |
169 | 169 |
|
@@ -359,9 +359,8 @@ public GeneralCommandLine createCommandLine() throws ExecutionException { |
359 | 359 |
|
360 | 360 | commandLine.withWorkDirectory(myWorkDirectory); |
361 | 361 | commandLine.addParameters(myParameterList.getList()); |
362 | | - commandLine.setPassParentEnvironment(myPassParentEnvironment); |
| 362 | + commandLine.withParentEnvironmentType(myParentEnvironmentType); |
363 | 363 | commandLine.withCharset(CharsetToolkit.UTF8_CHARSET); |
364 | | - EncodingEnvironmentUtil.setLocaleEnvironmentIfMac(commandLine); |
365 | 364 | return commandLine; |
366 | 365 | } |
367 | 366 |
|
|
0 commit comments