From a4e98163fb80d476ee8e841420f7eefff0e31eed Mon Sep 17 00:00:00 2001 From: Eneko Lakasta Date: Wed, 10 Jan 2018 11:13:49 +0100 Subject: [PATCH] set ICU_DATA env variable at app bootstrap --- app.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app.js b/app.js index 9270cac0..f74b1e0b 100755 --- a/app.js +++ b/app.js @@ -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 [options]') .help('h')