Skip to content

Commit

Permalink
build: update groovy wrapper (#5141)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdrueckert authored Sep 25, 2023
1 parent 55f30ff commit 5957641
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 27 deletions.
Binary file modified gradle/wrapper/groovy-wrapper.jar
Binary file not shown.
28 changes: 1 addition & 27 deletions groovyw.bat
Original file line number Diff line number Diff line change
Expand Up @@ -77,33 +77,7 @@ set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute

@REM Escapes all arguments containing either "*" or "?" before passing them to the groovy process
:process_args
@REM If we have no more arguments to process then exit the loop
IF "%1"=="" GOTO end
SET ARG=%~1
@REM "echo "%ARG%" will simply output the argument as an escaped text string
@REM for piping to other applications. This is needed to ensure that the arguments are not expanded.
@REM findstr is a built-in Windows utility (it has been since Windows 2000)
@REM that finds matches in strings based on regular expressions.
@REM The "&&" operator is followed if the findstr program returns an exit code of 0
@REM Otherwise, the "||" operator is followed instead.
echo "%ARG%" | findstr /C:"\*" 1>nul && (
SET CMD_LINE_ARGS=%CMD_LINE_ARGS% "%ARG%"
) || (
echo "%ARG%" | findstr /C:"\?" 1>nul && (
SET CMD_LINE_ARGS=%CMD_LINE_ARGS% "%ARG%"
) || (
SET CMD_LINE_ARGS=%CMD_LINE_ARGS% %ARG%
)
)
SHIFT
GOTO process_args

:end
@REM For some reason, the escaped arguments always contain an extra space at the end, which confuses groovy.
@REM This should remove it.
SET CMD_LINE_ARGS=%CMD_LINE_ARGS:~1%
set CMD_LINE_ARGS=%*

:execute
@rem Setup the command line
Expand Down

0 comments on commit 5957641

Please sign in to comment.