Skip to content

Commit 0f610e9

Browse files
committed
Get rid of deprecated method usages
1 parent 4d57679 commit 0f610e9

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/com/goide/util/GoExecutor.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import com.intellij.execution.ExecutionHelper;
2626
import com.intellij.execution.ExecutionModes;
2727
import com.intellij.execution.RunContentExecutor;
28-
import com.intellij.execution.configurations.EncodingEnvironmentUtil;
2928
import com.intellij.execution.configurations.GeneralCommandLine;
3029
import com.intellij.execution.configurations.ParametersList;
3130
import com.intellij.execution.configurations.PtyCommandLine;
@@ -73,7 +72,7 @@ public class GoExecutor {
7372
private boolean myShowOutputOnError;
7473
private boolean myShowNotificationsOnError;
7574
private boolean myShowNotificationsOnSuccess;
76-
private boolean myPassParentEnvironment = true;
75+
private GeneralCommandLine.ParentEnvironmentType myParentEnvironmentType = GeneralCommandLine.ParentEnvironmentType.CONSOLE;
7776
private boolean myPtyDisabled;
7877
@Nullable private String myExePath;
7978
@Nullable private String myPresentableName;
@@ -163,7 +162,8 @@ public GoExecutor withExtraEnvironment(@NotNull Map<String, String> environment)
163162

164163
@NotNull
165164
public GoExecutor withPassParentEnvironment(boolean passParentEnvironment) {
166-
myPassParentEnvironment = passParentEnvironment;
165+
myParentEnvironmentType = passParentEnvironment ? GeneralCommandLine.ParentEnvironmentType.CONSOLE
166+
: GeneralCommandLine.ParentEnvironmentType.NONE;
167167
return this;
168168
}
169169

@@ -359,9 +359,8 @@ public GeneralCommandLine createCommandLine() throws ExecutionException {
359359

360360
commandLine.withWorkDirectory(myWorkDirectory);
361361
commandLine.addParameters(myParameterList.getList());
362-
commandLine.setPassParentEnvironment(myPassParentEnvironment);
362+
commandLine.withParentEnvironmentType(myParentEnvironmentType);
363363
commandLine.withCharset(CharsetToolkit.UTF8_CHARSET);
364-
EncodingEnvironmentUtil.setLocaleEnvironmentIfMac(commandLine);
365364
return commandLine;
366365
}
367366

0 commit comments

Comments
 (0)