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;
|
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);
|
OperationMode.init(args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,8 +24,8 @@ import java.util.concurrent.Callable;
|
||||||
@CommandLine.Command(
|
@CommandLine.Command(
|
||||||
header = "Launches the XPipe daemon.",
|
header = "Launches the XPipe daemon.",
|
||||||
sortOptions = false,
|
sortOptions = false,
|
||||||
showEndOfOptionsDelimiterInUsageHelp = true,
|
showEndOfOptionsDelimiterInUsageHelp = true
|
||||||
subcommands = {LauncherHelpCommand.class})
|
)
|
||||||
public class LauncherCommand implements Callable<Integer> {
|
public class LauncherCommand implements Callable<Integer> {
|
||||||
|
|
||||||
@CommandLine.Option(
|
@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));
|
.ifPresentOrElse(t -> {}, () -> canceled.set(true));
|
||||||
|
|
||||||
if (canceled.get()) {
|
if (canceled.get()) {
|
||||||
ErrorEvent.fromMessage("Unlock cancelled").term().omit().handle();
|
ErrorEvent.fromMessage("Unlock cancelled").expected().term().omit().handle();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue