1.479-SNAPSHOT. Create a freeform project, add a shell build step, and enter
[ -n x ]
for the script. (This should pass.) Now visit config.xml and you will see
<hudson.tasks.Shell> <command>"[ -n x ]"</command> </hudson.tasks.Shell>
which is clearly wrong and would fail:
[test] $ /bin/sh -xe /tmp/hudson123.sh + [ -n x ] /tmp/hudson123.sh: 2: /tmp/hudson123.sh: [ -n x ]: not found Build step 'Execute shell' marked build as failure
Workaround:
test -n x
- is duplicated by
-
JENKINS-12576 Execute shell build step - spurious quotes in script
-
- Resolved
-
-
JENKINS-13856 Jenkins wraps square and curly bracket string parameter values in quotation marks
-
- Resolved
-
-
JENKINS-17174 Javascript proxy failes when sending html/xml formated messages
-
- Resolved
-
- is related to
-
JENKINS-14542 Issue ID Pattern no longer working
-
- Resolved
-
http://json-lib.sourceforge.net/changes-report.html#a2.2 notes "Extra quotes on string values with {} and []". Diffing 2.1 to 2.2 (there is no apparent SCM?) shows what seems to be an odd fix:
Theoretically https://github.com/aalmiray/Json-lib should show the details, though I am finding it hard to follow the history there - meaningless commit messages, no tags.