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

Commit f7dd5d9

Browse files
committed
fix: generate version.txt if not exist
1 parent 94c1175 commit f7dd5d9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

engine/services/engine_service.cc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,13 @@ EngineService::GetInstalledEngineVariants(const std::string& engine) const {
772772
// try to find version.txt
773773
auto version_txt_path = version_entry.path() / "version.txt";
774774
if (!std::filesystem::exists(version_txt_path)) {
775-
continue;
775+
// create new one
776+
std::ofstream meta(version_txt_path, std::ios::out);
777+
meta << "name: " << entry.path().filename() << std::endl;
778+
meta << "version: " << version_entry.path().filename() << std::endl;
779+
meta.close();
780+
CTL_INF("name: " << entry.path().filename().string() << ", version: "
781+
<< version_entry.path().filename().string());
776782
}
777783

778784
try {

0 commit comments

Comments
 (0)