mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Cleanup (logging; formatting)
GitOrigin-RevId: f9ce235b02f6c2289d8811d028e1339e69b372e7
This commit is contained in:
committed by
intellij-monorepo-bot
parent
448f4a3242
commit
97f2b953ea
@@ -9,7 +9,6 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public final class WSLCommandLineOptions {
|
||||
|
||||
private boolean myLaunchWithWslExe = true;
|
||||
private boolean myExecuteCommandInShell = true;
|
||||
private boolean mySudo = false;
|
||||
|
||||
+12
-15
@@ -44,8 +44,7 @@ final class WslDistributionDescriptor {
|
||||
/**
|
||||
* Necessary for serializer
|
||||
*/
|
||||
WslDistributionDescriptor() {
|
||||
}
|
||||
WslDistributionDescriptor() { }
|
||||
|
||||
WslDistributionDescriptor(@NotNull String msId) {
|
||||
this(msId, msId, null, msId);
|
||||
@@ -163,28 +162,26 @@ final class WslDistributionDescriptor {
|
||||
@Nullable
|
||||
private List<String> readWSLOutput(WSLCommandLineOptions options, List<@NonNls String> command) {
|
||||
WSLDistribution distribution = WSLUtil.getDistributionById(getId());
|
||||
if (distribution == null) {
|
||||
return null;
|
||||
}
|
||||
ProcessOutput pwdOutput;
|
||||
if (distribution == null) return null;
|
||||
|
||||
ProcessOutput output;
|
||||
try {
|
||||
pwdOutput = distribution.executeOnWsl(command, options, -1, null);
|
||||
output = distribution.executeOnWsl(command, options, -1, null);
|
||||
}
|
||||
catch (ExecutionException e) {
|
||||
LOG.warn("Error reading pwd output for " + getId(), e);
|
||||
LOG.warn("Start failed on " + getId(), e);
|
||||
return null;
|
||||
}
|
||||
|
||||
if (pwdOutput.getExitCode() != 0) {
|
||||
LOG.info("Non-zero exit code while fetching pwd: " +
|
||||
"[id=" + getId() + "; " +
|
||||
"[exitCode=" + pwdOutput.getExitCode() + "; " +
|
||||
"[stderr=" + pwdOutput.getStderr() + "; " +
|
||||
"[stdout=" + pwdOutput.getStdout() + "]");
|
||||
if (output.getExitCode() != 0) {
|
||||
LOG.info("Execution failed on " + getId() +
|
||||
" [exitCode=" + output.getExitCode() +
|
||||
"; stderr=" + output.getStderr() +
|
||||
"; stdout=" + output.getStdout() + "]");
|
||||
return null;
|
||||
}
|
||||
|
||||
return pwdOutput.getStdoutLines();
|
||||
return output.getStdoutLines();
|
||||
}
|
||||
|
||||
@NonNls @Nullable
|
||||
|
||||
Reference in New Issue
Block a user