Commit dcb14627 authored by Jürgen Haas's avatar Jürgen Haas

Only overwrite templates that are not tracked by git

parent 0adf92ee
......@@ -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])) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment