Skip to content

Commit

Permalink
fix(dashmate): core reindex command not working (dashpay#2054)
Browse files Browse the repository at this point in the history
  • Loading branch information
pshenmic authored Aug 14, 2024
1 parent aa988ea commit c554062
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import dots from 'dot';
import * as glob from 'glob';
import { TEMPLATES_DIR } from '../constants.js';

Expand All @@ -15,8 +14,6 @@ export default function renderServiceTemplatesFactory(renderTemplate) {
* @return {Object<string,string>}
*/
function renderServiceTemplates(config) {
dots.templateSettings.strip = false;

const templatePaths = glob.sync(`${TEMPLATES_DIR}/**/*.dot`, {
ignore: {
// Ignore manual rendered templates
Expand Down
4 changes: 4 additions & 0 deletions packages/dashmate/src/templates/renderTemplateFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ export default function renderTemplateFactory() {
*/
function renderTemplate(templatePath, variables) {
const templateString = fs.readFileSync(templatePath, 'utf-8');

// do not strip \n
dots.templateSettings.strip = false;

const template = dots.template(templateString);

return template({ ...variables, crypto });
Expand Down

0 comments on commit c554062

Please sign in to comment.