From 1e4f73084a57c1d0e8b63f284b7b1dfd5dd67da8 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 16 Nov 2023 08:45:15 +0100 Subject: [PATCH] Bug 35174: Don't run gulp po commands if po dir is missing Signed-off-by: Jonathan Druart --- gulpfile.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gulpfile.js b/gulpfile.js index fd1ec83b68..0897e8361d 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -411,6 +411,11 @@ function getLanguages () { exports.build = build; exports.css = css; +if (args['_'][0].match("po:") && !fs.existsSync('misc/translator/po')) { + console.log("misc/translator/po does not exist. You should clone koha-l10n there. See https://wiki.koha-community.org/wiki/Translation_files for more details."); + process.exit(1); +} + exports['po:create'] = parallel(...poTypes.map(type => poTasks[type].create)); exports['po:update'] = parallel(...poTypes.map(type => poTasks[type].update)); exports['po:extract'] = parallel(...poTypes.map(type => poTasks[type].extract)); -- 2.39.5