mirror of
https://github.com/nodejs/node.git
synced 2026-10-14 10:26:26 -04:00
src: fix --icu-data-dir= regression
Commit a8734af ("src: make copies of startup environment variables")
from two weeks ago introduced a regression in the capturing of the
`--icu-data-dir=` switch: it captured the string up to the `=` instead
of what comes after it.
PR-URL: https://github.com/nodejs/node/pull/11255
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
This commit is contained in:
1 parent
46345b9374
commit
291b599bba
2 files changed
+3
-1
No files matched your search
+1
-1
@@ -3742,7 +3742,7 @@ static void ParseArgs(int* argc,
|
||||
#endif /* HAVE_OPENSSL */
|
||||
#if defined(NODE_HAVE_I18N_SUPPORT)
|
||||
} else if (strncmp(arg, "--icu-data-dir=", 15) == 0) {
|
||||
icu_data_dir.assign(arg, 15);
|
||||
icu_data_dir.assign(arg + 15);
|
||||
#endif
|
||||
} else if (strcmp(arg, "--expose-internals") == 0 ||
|
||||
strcmp(arg, "--expose_internals") == 0) {
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
'use strict';
|
||||
require('../common');
|
||||
const assert = require('assert');
|
||||
const config = process.binding('config');
|
||||
|
||||
// No-op when ICU case mappings are unavailable.
|
||||
assert.strictEqual('ç'.toLocaleUpperCase('el'), 'ç');
|
||||
assert.strictEqual(config.icuDataDir, 'test/fixtures/empty/');
|
||||
Reference in new issue
Block a user