mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-04-26 09:28:26 -04:00
Small fixes
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user