summaryrefslogtreecommitdiff
path: root/scripts/frontend
diff options
context:
space:
mode:
authorgfyoung <gfyoung17@gmail.com>2018-08-19 00:16:05 -0700
committergfyoung <gfyoung17@gmail.com>2018-08-19 01:05:50 -0700
commit8a3d565c8e13cf30c48958b9dcc8142feee39322 (patch)
tree9c7feb2135d3227bafbee89f517fcb85ed6532eb /scripts/frontend
parentd195ee8f81f0b8aa491b27be6a1e9492bcab4a68 (diff)
downloadgitlab-ce-8a3d565c8e13cf30c48958b9dcc8142feee39322.tar.gz
Don't use arguments keyword in gettext script
Causing SAST build to fail unnecessarily. Follow-up to !19378.
Diffstat (limited to 'scripts/frontend')
-rw-r--r--scripts/frontend/extract_gettext_all.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/frontend/extract_gettext_all.js b/scripts/frontend/extract_gettext_all.js
index af8cc4c3341..725522a3540 100644
--- a/scripts/frontend/extract_gettext_all.js
+++ b/scripts/frontend/extract_gettext_all.js
@@ -7,7 +7,7 @@ const {
} = require('gettext-extractor-vue');
const ensureSingleLine = require('../../app/assets/javascripts/locale/ensure_single_line.js');
-const arguments = argumentsParser
+const args = argumentsParser
.option('-f, --file <file>', 'Extract message from one single file')
.option('-a, --all', 'Extract message from all js/vue files')
.parse(process.argv);
@@ -61,12 +61,12 @@ function printJson() {
console.log(JSON.stringify(messages));
}
-if (arguments.file) {
- vueParser.parseFile(arguments.file).then(() => printJson());
-} else if (arguments.all) {
+if (args.file) {
+ vueParser.parseFile(args.file).then(() => printJson());
+} else if (args.all) {
vueParser.parseFilesGlob('{ee/app,app}/assets/javascripts/**/*.{js,vue}').then(() => printJson());
} else {
console.warn('ERROR: Please use the script correctly:');
- arguments.outputHelp();
+ args.outputHelp();
process.exit(1);
}