Return unknown version if project version is not available

This commit is contained in:
AsamK committed 2021-12-22 19:19:19 +01:00
1 parent f9ecaa8ad6
commit c2801c447d
1 file changed
+2 -1
@@ -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));
}
}