Skip to content
Snippets Groups Projects
Commit dcb14627 authored by jurgenhaas's avatar jurgenhaas
Browse files

Only overwrite templates that are not tracked by git

parent 0adf92ee
No related branches found
No related tags found
No related merge requests found
......@@ -86,7 +86,7 @@ class Handler extends BaseHandler {
$twig_loader->setTemplate($template, $template);
$filename = $twig->render($template, $options);
$file = $def['dest'] . '/' . $filename;
if ($overwrite || !$fs->exists($file)) {
if (($overwrite && empty($def['add2git'])) || !$fs->exists($file)) {
$twig_loader->setTemplate($filename, file_get_contents($pluginRoot . '/templates/' . ($def['source'] ?? '') . $template . '.twig'));
$rendered = $twig->render($filename, $options);
if (!empty($def['add2yaml']) && isset($options[$filename])) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment