Return unknown version if project version is not available

This commit is contained in:
AsamK 2021-12-22 19:19:19 +01:00
parent f9ecaa8ad6
commit c2801c447d

View file

@ -30,6 +30,7 @@ public class VersionCommand implements JsonRpcSingleCommand<Void>, JsonRpcMultiC
}
private void outputVersion(final JsonWriter jsonWriter) {
jsonWriter.write(Map.of("version", BaseConfig.PROJECT_VERSION));
jsonWriter.write(Map.of("version",
BaseConfig.PROJECT_VERSION == null ? "unknown" : BaseConfig.PROJECT_VERSION));
}
}