add filename to less render call (#8459)

v1.18.x
Billy Ohgren 5 years ago committed by GitHub
parent da29b947bf
commit 89062d8e70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -223,12 +223,15 @@ function launch(req, res) {
}
function compileLess(callback) {
fs.readFile(path.join(__dirname, '../public/less/install.less'), function (err, style) {
var installSrc = path.join(__dirname, '../public/less/install.less');
fs.readFile(installSrc, function (err, style) {
if (err) {
return winston.error('Unable to read LESS install file: ', err.stack);
}
less.render(style.toString(), function (err, css) {
less.render(style.toString(), {
filename: path.resolve(installSrc),
}, function (err, css) {
if (err) {
return winston.error('Unable to compile LESS: ', err.stack);
}

Loading…
Cancel
Save