Skip to content

Commit

Permalink
fix: encoding issue when executing tasks (#169)
Browse files Browse the repository at this point in the history
Signed-off-by: Luca Stocchi <[email protected]>
  • Loading branch information
lstocchi committed Jul 13, 2022
1 parent d2f350c commit 88dbd8f
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import com.intellij.icons.AllIcons;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Key;
import com.intellij.openapi.vfs.encoding.EncodingProjectManager;
import com.intellij.terminal.TerminalExecutionConsole;
import com.intellij.ui.AnimatedIcon;
import com.intellij.util.Consumer;
Expand Down Expand Up @@ -65,7 +66,7 @@ private void init() {
ProcessListener processListener = buildProcessListener();
setProcessListener(processListener);
setTerminalExecutionConsole(commonTerminalExecutionConsole);
setProcessHandlerFunction();
setProcessHandlerFunction(actionFuncHandler.getProject());
}

protected ProcessListener buildProcessListener() {
Expand Down Expand Up @@ -185,11 +186,11 @@ public int getStepIndex() {
return stepIndex;
}

private void setProcessHandlerFunction() {
private void setProcessHandlerFunction(Project project) {
processHandlerFunction = processHandlerInput -> {
runHandler = new ExecProcessHandler(processHandlerInput.getProcess(),
processHandlerInput.getCommandLine(),
processHandlerInput.getCharset());
EncodingProjectManager.getInstance(project).getDefaultCharset());
return runHandler;
};
}
Expand Down

0 comments on commit 88dbd8f

Please sign in to comment.