Update source/src/commands/publish-template.cpp
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user