Update source/src/templates.cpp
This commit is contained in:
@@ -355,7 +355,11 @@
|
||||
info << "Template extracted successfully. SHA256: " << actual_unpacked_hash << std::endl;
|
||||
|
||||
std::filesystem::path template_info_env_path = template_cache_dir / filenames::template_info_env;
|
||||
ASSERT( std::filesystem::exists( template_info_env_path ), "template_info.env doesn't exist in the template." );
|
||||
if (!std::filesystem::exists(template_info_env_path)) {
|
||||
error << "template_info.env doesn't exist in template '" << template_name << "'" << std::endl;
|
||||
std::filesystem::remove_all(template_cache_dir);
|
||||
return template_info();
|
||||
}
|
||||
|
||||
// Update cache JSON file
|
||||
nlohmann::json cache_json;
|
||||
@@ -448,7 +452,9 @@
|
||||
for (const auto& source : mSources) {
|
||||
auto source_templates = source->get_template_list();
|
||||
for (const auto& t : source_templates) {
|
||||
if (seen.insert(t).second)
|
||||
if (!seen.insert(t).second)
|
||||
continue;
|
||||
if (source->template_command_exists(t, "install"))
|
||||
result.push_back({t, source->get_description()});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user