Disable help

This commit is contained in:
crschnick 2023-11-27 16:57:18 +00:00
parent 767c87670d
commit b146b9bb27
4 changed files with 10 additions and 26 deletions

View file

@ -12,6 +12,13 @@ public class Main {
return;
}
// Since this is not marked as a console application, it will not print anything when you run it in a console
// So sadly there can't be a help command
// if (args.length == 1 && args[0].equals("--help")) {
// System.out.println("HELP");
// return;
// }
OperationMode.init(args);
}
}

View file

@ -24,8 +24,8 @@ import java.util.concurrent.Callable;
@CommandLine.Command(
header = "Launches the XPipe daemon.",
sortOptions = false,
showEndOfOptionsDelimiterInUsageHelp = true,
subcommands = {LauncherHelpCommand.class})
showEndOfOptionsDelimiterInUsageHelp = true
)
public class LauncherCommand implements Callable<Integer> {
@CommandLine.Option(

View file

@ -1,23 +0,0 @@
package io.xpipe.app.launcher;
import picocli.CommandLine;
import java.util.concurrent.Callable;
@CommandLine.Command(
name = "--help",
header = "Displays help information",
helpCommand = true
)
public class LauncherHelpCommand implements Callable<Integer> {
@Override
public Integer call() {
System.out.println("""
HELP
COMMAND!
""");
return 0;
}
}

View file

@ -47,7 +47,7 @@ public class UnlockAlert {
.ifPresentOrElse(t -> {}, () -> canceled.set(true));
if (canceled.get()) {
ErrorEvent.fromMessage("Unlock cancelled").term().omit().handle();
ErrorEvent.fromMessage("Unlock cancelled").expected().term().omit().handle();
return;
}