Update source/src/commands/publish-template.cpp
All checks were successful
Build-Test-Publish / build (linux/amd64) (push) Successful in 27s
Build-Test-Publish / build (linux/arm64) (push) Successful in 1m7s

This commit is contained in:
j
2026-01-14 15:07:41 +13:00
parent 8dec86de93
commit 8b1433c03b

View File

@@ -47,7 +47,7 @@ Usage:
Arguments:
--all Publish all templates in subdirectories of DIRECTORY.
Only publishes subdirectories containing config/.template_info.env
Only publishes subdirectories containing template_info.env
REGISTRY_NAME Optional. Name of the template registry to publish to.
If not specified, uses the first registry with a token.
DIRECTORY Path to the template directory (or parent directory with --all).
@@ -301,9 +301,9 @@ static bool publish_to_registry(const std::string& server_url, const std::string
}
}
// Check if a directory is a valid template (has config/.template_info.env)
// Check if a directory is a valid template (has template_info.env at root)
static bool is_valid_template_dir(const std::filesystem::path& dir_path) {
return std::filesystem::exists(dir_path / "config" / ".template_info.env");
return std::filesystem::exists(dir_path / "template_info.env");
}
// Publish a single template directory
@@ -535,7 +535,7 @@ int publish_template_handler(const CommandContext& ctx) {
if (template_dirs.empty()) {
error << "No valid templates found in " << target_dir << std::endl;
info << "Templates must have config/.template_info.env" << std::endl;
info << "Templates must have template_info.env" << std::endl;
return 1;
}