set ICU_DATA env variable at app bootstrap

This commit is contained in:
Eneko Lakasta 2018-01-10 11:13:49 +01:00
parent 00a4f481f6
commit a4e98163fb

10
app.js
View File

@ -16,6 +16,16 @@ if (!semver.satisfies(nodejsVersion, '>=6.9.0')) {
process.exit(1);
}
// See https://github.com/CartoDB/support/issues/984
// CartoCSS properties text-wrap-width/text-wrap-character not working
// This function should be called as soon as possible.
function setICUEnvVariable() {
if (process.env['ICU_DATA'] === undefined) {
process.env['ICU_DATA'] = __dirname + '/node_modules/mapnik/lib/binding/node-v48-linux-x64/share/mapnik/icu';
}
}
setICUEnvVariable();
var argv = require('yargs')
.usage('Usage: $0 <environment> [options]')
.help('h')