diff --git a/src/Generators/ProjectGenerator/ProjectGenerator.cpp b/src/Generators/ProjectGenerator/ProjectGenerator.cpp index 6aebfe8..e0baad9 100644 --- a/src/Generators/ProjectGenerator/ProjectGenerator.cpp +++ b/src/Generators/ProjectGenerator/ProjectGenerator.cpp @@ -100,6 +100,13 @@ namespace Frate::Generators::Project { LuaAPI::postScripts(lua, inter->pro); + Utils::info << "Copying rendered template to project" << std::endl; + + std::filesystem::copy( + render_path, inter->pro->path, + std::filesystem::copy_options::recursive | + std::filesystem::copy_options::overwrite_existing); + // This ia bit of a hack, because create doesn't actually load a project so // we have to emulate the loading process inter->pro->loaded_json = true; @@ -139,6 +146,13 @@ namespace Frate::Generators::Project { LuaAPI::postScripts(lua, inter->pro); + Utils::verbose << "Copying rendered template to project" << std::endl; + + std::filesystem::copy( + render_path, inter->pro->path, + std::filesystem::copy_options::recursive | + std::filesystem::copy_options::overwrite_existing); + std::filesystem::remove_all(render_path); return true; diff --git a/src/Project/TemplateManager.cpp b/src/Project/TemplateManager.cpp index f704a1b..5608612 100644 --- a/src/Project/TemplateManager.cpp +++ b/src/Project/TemplateManager.cpp @@ -204,7 +204,6 @@ namespace Frate { << new_file_path.string() << std::endl; } } - exit(-1); return tmp_gen_path; }