I have the following upload task defined in upload.files
:
{
"path": "email-worker",
"file": "email-worker.json",
"type": "json",
"lang": "${autodetectLang}",
"pattern": "email-worker/src/translations/locales/*.json",
"excludes": ["email-worker/src/translations/locales/en.json"]
},
When running localazy upload
I get the following error:
Localazy CLI, v2.0.5
Command-line tool for the Localazy platform.
Read more information at https://localazy.com/docs/cli
SyntaxError: Invalid regular expression: /^email\-worker/src/translations/locales/en\.json$/gu: Invalid escape
It looks like the resulting RegEx is incorrectly escaped, causing a crash. Not sure what spec is being used, but generally hyphens should not be escaped outside of character classes (like how it’s escaping email\-worker
in the error above).
This does not happen on CLI v1.7.15.