You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2019/09/17 03:44:41 UTC

[karaf] branch karaf-4.2.x updated: [KARAF-6257] Fix argument parsing on client.bat

This is an automated email from the ASF dual-hosted git repository.

jbonofre pushed a commit to branch karaf-4.2.x
in repository https://gitbox.apache.org/repos/asf/karaf.git


The following commit(s) were added to refs/heads/karaf-4.2.x by this push:
     new e5eca14  [KARAF-6257] Fix argument parsing on client.bat
e5eca14 is described below

commit e5eca14530cc70705f5f9bb4f440fe8f793cf95d
Author: Jean-Baptiste Onofré <jb...@apache.org>
AuthorDate: Mon Sep 16 20:53:48 2019 +0200

    [KARAF-6257] Fix argument parsing on client.bat
    
    (cherry picked from commit 65fea377f5cf874d7b31211d5619662879fbda9c)
---
 .../main/filtered-resources/resources/bin/client.bat    | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/assemblies/features/base/src/main/filtered-resources/resources/bin/client.bat b/assemblies/features/base/src/main/filtered-resources/resources/bin/client.bat
index caeba55..a451db6 100644
--- a/assemblies/features/base/src/main/filtered-resources/resources/bin/client.bat
+++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/client.bat
@@ -219,8 +219,21 @@ set CLASSPATH=%CLASSPATH%;%KARAF_HOME%\system\org\fusesource\jansi\jansi\@@jansi
 set CLASSPATH=%CLASSPATH%;%KARAF_HOME%\system\org\slf4j\slf4j-api\@@slf4j.version@@\slf4j-api-@@slf4j.version@@.jar
 
 :EXECUTE
-    if "%SHIFT%" == "true" SET ARGS=%2 %3 %4 %5 %6 %7 %8 %9 %10 %11
-    if not "%SHIFT%" == "true" SET ARGS=%1 %2 %3 %4 %5 %6 %7 %8 %9 %10 %11
+    set arg1=%~1
+    set arg2=%~2
+    set arg3=%~3
+    set arg4=%~4
+    set arg5=%~5
+    set arg6=%~6
+    set arg7=%~7
+    set arg8=%~8
+    set arg9=%~9
+    shift
+    set arg10=%~9
+    shift
+    set arg11=%~9
+    if "%SHIFT%" == "true" SET ARGS=%arg2% %arg3% %arg4% %arg5% %arg6% %arg7% %arg8% %arg9% %arg10% %arg11%
+    if not "%SHIFT%" == "true" SET ARGS=%arg1% %arg2% %arg3% %arg4% %arg5% %arg6% %arg7% %arg8% %arg9% %arg10% %arg11%
     rem Execute the Java Virtual Machine
     "%JAVA%" %JAVA_OPTS% %OPTS% -classpath "%CLASSPATH%" -Dkaraf.instances="%KARAF_HOME%\instances" -Dkaraf.home="%KARAF_HOME%" -Dkaraf.base="%KARAF_BASE%" -Dkaraf.etc="%KARAF_ETC%" -Dkaraf.log="%KARAF_LOG%" -Djava.io.tmpdir="%KARAF_DATA%\tmp" -Djava.util.logging.config.file="%KARAF_BASE%\etc\java.util.logging.properties" %KARAF_OPTS% org.apache.karaf.client.Main %ARGS%