Update source/src/services.cpp
This commit is contained in:
@@ -114,17 +114,13 @@ namespace dropshell
|
||||
template_info tinfo = gTemplateManager().get_template_info(service.template_name);
|
||||
if (!tinfo.is_set())
|
||||
{
|
||||
// Template might be available from registry but not cached yet
|
||||
// Don't fail here - let the install command handle downloading if needed
|
||||
warning << "Template '" << service.template_name << "' not found locally, may need to download from registry" << std::endl;
|
||||
// Set template_name but leave local_template_path empty
|
||||
// The install command will try to get the template again
|
||||
// Template not found - this means it's not available locally OR from registry
|
||||
error << "Template '" << service.template_name << "' not found locally or in registry" << std::endl;
|
||||
return LocalServiceInfo();
|
||||
}
|
||||
else
|
||||
{
|
||||
// find the template path
|
||||
|
||||
// Template is available (either locally or downloaded from registry)
|
||||
service.local_template_path = tinfo.local_template_path();
|
||||
}
|
||||
|
||||
{ // set the user.
|
||||
auto it = variables.find("SSH_USER");
|
||||
@@ -279,13 +275,13 @@ namespace dropshell
|
||||
<< std::endl;
|
||||
return false;
|
||||
}
|
||||
// Try to get the template - this will download from registry if needed
|
||||
template_info tinfo = gTemplateManager().get_template_info(it->second);
|
||||
if (!tinfo.is_set())
|
||||
{
|
||||
// Don't fail here - template might be available from registry but not cached yet
|
||||
// This allows services to be installed even when templates need to be downloaded
|
||||
warning << "Template '" << it->second << "' not immediately available, may need to download from registry" << std::endl;
|
||||
// Continue anyway - the actual install/operation will handle downloading if needed
|
||||
// Template is not available locally or from registry
|
||||
error << "Template '" << it->second << "' not found locally or in registry" << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user