Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit f5c0ac0

Browse files
committed
fix: engines install pre-release
1 parent 6cda3ee commit f5c0ac0

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

engine/cli/commands/engine_install_cmd.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ bool EngineInstallCmd::Exec(const std::string& engine,
3333

3434
httplib::Client cli(host_ + ":" + std::to_string(port_));
3535
Json::Value json_data;
36+
json_data["version"] = version.empty() ? "latest" : version;
3637
auto data_str = json_data.toStyledString();
3738
cli.set_read_timeout(std::chrono::seconds(60));
3839
auto res = cli.Post("/v1/engines/install/" + engine, httplib::Headers(),

engine/controllers/engines.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ void Engines::InstallEngine(
2020
return;
2121
}
2222

23-
auto version{"latest"};
23+
auto version = (*(req->getJsonObject())).get("version", "latest").asString();
2424
auto result = engine_service_->InstallEngineAsync(engine, version);
2525
if (result.has_error()) {
2626
Json::Value res;

0 commit comments

Comments
 (0)