Skip to content

Commit 60deb88

Browse files
authored
Add way to override command in cli help message (#742)
1 parent bc64e61 commit 60deb88

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ FROM eclipse-temurin:21-jre-jammy
22

33
WORKDIR /app
44

5+
ENV BLUEMAP_COMMAND="docker run --rm -it ghcr.io/bluemap-minecraft/bluemap"
6+
57
COPY build/release/*-cli.jar cli.jar
68

79
ENTRYPOINT [ "java", "-jar", "cli.jar" ]

implementations/cli/src/main/java/de/bluecolored/bluemap/cli/BlueMapCLI.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,10 @@ private static void printHelp() {
546546
private static String getCliCommand() {
547547
String filename = "bluemap-cli.jar";
548548
try {
549+
if (System.getenv("BLUEMAP_COMMAND") != null) {
550+
return System.getenv("BLUEMAP_COMMAND");
551+
}
552+
549553
Path file = Path.of(BlueMapCLI.class.getProtectionDomain()
550554
.getCodeSource()
551555
.getLocation()

0 commit comments

Comments
 (0)