[JIRA] [core] (JENKINS-27113) Escape absolute path contained in globaly exposed variable $WORKSPACE

20 views
Skip to first unread message

janno@ut.ee (JIRA)

unread,
Feb 24, 2015, 3:50:31 PM2/24/15
to jenkinsc...@googlegroups.com
Issue Type: Improvement Improvement
Assignee: Unassigned
Components: core
Created: 24/Feb/15 8:49 PM
Description:

Hope I am not asking for something that has already been suggested.
I think it would be nice to have spaces in this variable escaped. This would make build scripts more readable with default configuration.

I have read this issue report:
https://issues.jenkins-ci.org/browse/JENKINS-20600
And also seen the answers given in there.
I agree with the decision made there.

I would still like to see if this idea floats.

Environment: Jenkins ver. 1.599
CentOS 7
Project: Jenkins
Labels: job variable
Priority: Minor Minor
Reporter: Janno Jõgeva
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

daniel@beckweb.net (JIRA)

unread,
Feb 24, 2015, 5:21:28 PM2/24/15
to jenkinsc...@googlegroups.com
Daniel Beck commented on Improvement JENKINS-27113

What exactly are you asking for? In what way should spaces be escaped where?

janno@ut.ee (JIRA)

unread,
Feb 24, 2015, 6:32:31 PM2/24/15
to jenkinsc...@googlegroups.com
Change By: Janno Jõgeva (24/Feb/15 11:32 PM)
Description:
Hope I am not asking for something that has already been suggested.

I think it would be nice to have spaces in  this  $WORKSPACE  variable escaped. This would make build scripts more readable with default configuration.

Just to clarify I  am talking about the variable that is listed at jenkins.example.com/env-vars.html
The one that is described as (The absolute path of the directory assigned on the master node for Jenkins to store data.)
If a job has a name that has spaces in it then the value of that variable with default config would be:
/var/lib/jenkins/workspace/Name of Job
I am suggesting it to be:
/var/lib/jenkins/workspace/Name\ of\ Job

I
 have read this issue report:

https://issues.jenkins-ci.org/browse/JENKINS-20600
And also seen the answers given in there.
I agree with the decision made there.

I would still like to see if this idea floats.

janno@ut.ee (JIRA)

unread,
Feb 24, 2015, 6:36:31 PM2/24/15
to jenkinsc...@googlegroups.com

Thanks for the question! Hope it is better now.

daniel@beckweb.net (JIRA)

unread,
Feb 25, 2015, 4:30:31 AM2/25/15
to jenkinsc...@googlegroups.com
Daniel Beck commented on Improvement JENKINS-27113

I don't think escaping works like you expect it to.

In particular, this change would break everything that today handles spaces correctly.

What specifically do you have problems with? In shell build steps, for example, you can just wrap $WORKSPACE in double quotes and you're good.

Reply all
Reply to author
Forward
0 new messages