Small fixes

This commit is contained in:
Christopher Schnick
2022-10-19 05:20:17 +02:00
parent a2238be4cd
commit d6cccd1d5a
5 changed files with 42 additions and 16 deletions

View File

@@ -4,13 +4,19 @@ import com.fasterxml.jackson.annotation.JsonProperty;
public enum DataFlow {
@JsonProperty("input")
INPUT,
INPUT("Input"),
@JsonProperty("output")
OUTPUT,
OUTPUT("Output"),
@JsonProperty("inputOutput")
INPUT_OUTPUT,
INPUT_OUTPUT("Input/Output"),
@JsonProperty("transformer")
TRANSFORMER;
TRANSFORMER("Transformer");
private final String displayName;
DataFlow(String displayName) {
this.displayName = displayName;
}
public boolean hasInput() {
return this == INPUT || this == INPUT_OUTPUT;
@@ -19,4 +25,8 @@ public enum DataFlow {
public boolean hasOutput() {
return this == OUTPUT || this == INPUT_OUTPUT;
}
public String getDisplayName() {
return displayName;
}
}

View File

@@ -42,7 +42,7 @@ public class ShellTypes {
public static StandardShellStore.ShellType[] getAvailable(ShellStore store) throws Exception {
var o = store.prepareCommand(List.of(), List.of("echo", "$0"), null, StandardCharsets.US_ASCII)
.executeAndReadStdoutOrThrow();
if (!o.trim().equals("$0")) {
if (o.trim().length() > 0 && !o.trim().equals("$0")) {
return getLinuxShells();
} else {
return getWindowsShells();