Projects
Mega:24.03:SP1:Everything
groovy
_service:tar_scm:0009-add-parameter-check-for-g...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:0009-add-parameter-check-for-grape-define.patch of Package groovy
From 696538030dcf6ba670cb1dd8f9d762d860aac01c Mon Sep 17 00:00:00 2001 From: wang--ge <wang__ge@126.com> Date: Thu, 14 Mar 2024 11:19:28 +0800 Subject: [PATCH] asd --- .../org/codehaus/groovy/tools/GrapeMain.groovy | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/main/org/codehaus/groovy/tools/GrapeMain.groovy b/src/main/org/codehaus/groovy/tools/GrapeMain.groovy index 0a1843d..528e8ed 100644 --- a/src/main/org/codehaus/groovy/tools/GrapeMain.groovy +++ b/src/main/org/codehaus/groovy/tools/GrapeMain.groovy @@ -348,10 +348,18 @@ if (cmd.hasOption('v')) { return } - -cmd.getOptionValues('D')?.each {String prop -> - def (k, v) = prop.split ('=', 2) as List // array multiple assignment quirk - System.setProperty(k, v ?: "") +if (cmd.hasOption('D')) { + cmd.getOptionValues('D')?.each {String prop -> + while (prop.startsWith("=")) { + prop = prop.substring(1, prop.length()); + } + def (k, v) = prop.split ('=', 2) as List // array multiple assignment quirk + if (k.isEmpty() || v.isEmpty()) { + println "one system property's name or value is emply, skip." + } else { + System.setProperty(k, v ?: "") + } + } } String[] arg = cmd.args -- 2.33.0
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2