mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-09-30 00:56:56 +13:00
Disable help
This commit is contained in:
parent
767c87670d
commit
b146b9bb27
4 changed files with 10 additions and 26 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue