parsing options and shell metacharacters
Reported by Charles Scott | June 10th, 2011 @ 10:54 AM
In order to prevent shell expansion, we typically single quote them. In rundeck, single quoting does not appear to be sufficient and additional escaping of single quoting is needed:
<command>
<exec>MyCommand -buildstamp ${option.buildstamp} -myresource \'${option.resourcename}\' -mytype \'[^\.]*\'</exec>
</command>
Perhaps this is a bug where the parser removes such quoting?
Comments and changes to this ticket
-
Alex-SF July 9th, 2011 @ 01:46 PM
- Tag set to options
-
Charles Scott October 12th, 2011 @ 04:32 PM
Ran into this again.....
I have the following shell invocation:
this doesn't work:
curl -L -k -f -o /tmp/ffffff.jar 'http://xcomm-nexus.local:8080/nexus/service/local/artifact/maven/content?r=snapshots&g=com.x.testapp&a=testapp&p=jar\&v=${option.version}'
where this does:
curl -L -k -f -o /tmp/ffffff.jar 'http://xcomm-nexus.local:8080/nexus/service/local/artifact/maven/content?r=snapshots\&g=com.x.testapp\&a=testapp\&p=jar\&v=${option.version}'
Notice that when I single quote, it is not going to work
I still have to escape the ampersand's
where as in a normal shell, I do not have to do this.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
(DEPRECATED) Please use github issues for issue tracking at http://github.com/dtolabs/rundeck/issues