From 53980cba36e8132b8d821bd447c11eb2d7a52efb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olov=20Ylinenp=C3=A4=C3=A4?= Date: Wed, 20 Nov 2024 17:31:26 +0100 Subject: [PATCH] Fix whelktool cli started without script --- whelktool/src/main/groovy/whelk/datatool/WhelkTool.groovy | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/whelktool/src/main/groovy/whelk/datatool/WhelkTool.groovy b/whelktool/src/main/groovy/whelk/datatool/WhelkTool.groovy index febc45efb1..5cd15df146 100644 --- a/whelktool/src/main/groovy/whelk/datatool/WhelkTool.groovy +++ b/whelktool/src/main/groovy/whelk/datatool/WhelkTool.groovy @@ -831,6 +831,11 @@ class WhelkTool { int statsNumIds = options.n ? Integer.parseInt(options.n) : DEFAULT_STATS_NUM_IDS Script script = null + if (!scriptPath) { + cli.usage() + System.exit(1) + } + try { script = new FileScript(scriptPath)