mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-21 23:20:23 +00:00
Fix NPE
This commit is contained in:
parent
b8a981eb1f
commit
c7d38843da
1 changed files with 4 additions and 4 deletions
|
@ -44,11 +44,11 @@ public class ShellDialects {
|
|||
}
|
||||
|
||||
public static boolean isPowershell(ShellControl sc) {
|
||||
return sc.getShellDialect().equals(POWERSHELL) || sc.getShellDialect().equals(POWERSHELL_CORE);
|
||||
}
|
||||
if (sc.getShellDialect() == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static ShellDialect byName(String name) {
|
||||
return byNameIfPresent(name).orElseThrow();
|
||||
return sc.getShellDialect().equals(POWERSHELL) || sc.getShellDialect().equals(POWERSHELL_CORE);
|
||||
}
|
||||
|
||||
public static Optional<ShellDialect> byNameIfPresent(String name) {
|
||||
|
|
Loading…
Reference in a new issue