mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Check if output type is supported by command
This commit is contained in:
parent
c588130491
commit
a2debdb234
6 changed files with 37 additions and 0 deletions
|
@ -91,6 +91,12 @@ public class Cli {
|
|||
return 1;
|
||||
}
|
||||
|
||||
OutputType outputType = ns.get("output");
|
||||
if (!command.getSupportedOutputTypes().contains(outputType)) {
|
||||
logger.error("Command doesn't support output type {}", outputType.toString());
|
||||
return 1;
|
||||
}
|
||||
|
||||
String username = ns.getString("username");
|
||||
|
||||
final boolean useDbus = ns.getBoolean("dbus");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue