mirror of
https://github.com/strapi/strapi.git
synced 2025-12-27 15:13:21 +00:00
fix: prevent argv check on "add-missing-keys-to-other-language" module import
This commit is contained in:
parent
ed49650a31
commit
3122052a4b
@ -63,16 +63,16 @@ const addMissingKeys = async lang => {
|
||||
translationFiles.forEach(addMissingKeyForSingleFile);
|
||||
};
|
||||
|
||||
if (process.argv.length < 3) {
|
||||
console.warn(
|
||||
chalk.yellow(
|
||||
'Please provide a language. For example:\nnode scripts/front/add-missing-keys-to-other-language.js vi'
|
||||
)
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if (require.main === module) {
|
||||
if (process.argv.length < 3) {
|
||||
console.warn(
|
||||
chalk.yellow(
|
||||
'Please provide a language. For example:\nnode scripts/front/add-missing-keys-to-other-language.js vi'
|
||||
)
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
addMissingKeys(process.argv[2]).catch(err => console.error(err));
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user