Skip to content

Commit

Permalink
Ensure custom templateCompilerPath is an absolute path.
Browse files Browse the repository at this point in the history
The examples that we show for using a custom template compiler path use
a relative path, but that doesn't actually work when inline compilation
runs and is parallelized (because the worker processes run from a
different relative root inside `/tmp`).

This ensures that any specified overrides are converted to absolute
paths.
  • Loading branch information
rwjblue committed May 8, 2020
1 parent 0d362f4 commit d13b5e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/ember-addon-main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict';

const path = require('path');
const SilentError = require('silent-error');
const utils = require('./utils');

Expand Down Expand Up @@ -201,7 +202,7 @@ module.exports = {
app.options['ember-cli-htmlbars'].templateCompilerPath;

if (templateCompilerPath) {
return templateCompilerPath;
return path.resolve(this.project.root, templateCompilerPath);
}

let ember = this.project.findAddonByName('ember-source');
Expand Down

0 comments on commit d13b5e2

Please sign in to comment.