Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

parsing options and shell metacharacters

#336

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?

Reported by Charles Scott · June 10th, 2011 @ 10:54 AM

State: new
Milestone: none
Assigned to: nobody

Activity

  1. Alex-SF
    Alex-SF
    • Tag set to options

    July 9th, 2011 @ 01:46 PM

  2. Charles Scott
    Charles Scott

    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.

    October 12th, 2011 @ 04:32 PM

  3. Charles Scott
    Charles Scott

    stupid markup destroyed my example entirely

    October 12th, 2011 @ 04:34 PM

  4. Greg Schueler
    Greg Schueler

    fixed formatting for you

    October 12th, 2011 @ 04:41 PM

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.