X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/1bf703b012521ac8b887be8a50b01bc7b62ce677..HEAD:/src/main/java/org/asamk/signal/App.java diff --git a/src/main/java/org/asamk/signal/App.java b/src/main/java/org/asamk/signal/App.java index f8585386..6352aa13 100644 --- a/src/main/java/org/asamk/signal/App.java +++ b/src/main/java/org/asamk/signal/App.java @@ -99,6 +99,9 @@ public class App { .help("Disable message send log (for resending messages that recipient couldn't decrypt)") .action(Arguments.storeTrue()); + parser.epilog( + "The global arguments are shown with 'signal-cli -h' and need to come before the subcommand, while the subcommand-specific arguments (shown with 'signal-cli SUBCOMMAND -h') need to be given after the subcommand."); + var subparsers = parser.addSubparsers().title("subcommands").dest("command"); Commands.getCommandSubparserAttachers().forEach((key, value) -> { @@ -288,11 +291,14 @@ public class App { commandHandler.handleMultiLocalCommand(command, multiAccountManager); } catch (IOException e) { throw new IOErrorException("Failed to load local accounts file", e); + } catch (AccountCheckException e) { + throw new UnexpectedErrorException("Failed to load account file", e); } } private RegistrationManager loadRegistrationManager( - final String account, final SignalAccountFiles signalAccountFiles + final String account, + final SignalAccountFiles signalAccountFiles ) throws UnexpectedErrorException { try { return signalAccountFiles.initRegistrationManager(account); @@ -306,7 +312,8 @@ public class App { } private Manager loadManager( - final String account, final SignalAccountFiles signalAccountFiles + final String account, + final SignalAccountFiles signalAccountFiles ) throws CommandException { logger.trace("Loading account file for {}", account); try {