{"action":"created","issue":{"url":"https://api.github.com/repos/rundeck/rundeck/issues/602","labels_url":"https://api.github.com/repos/rundeck/rundeck/issues/602/labels{/name}","comments_url":"https://api.github.com/repos/rundeck/rundeck/issues/602/comments","events_url":"https://api.github.com/repos/rundeck/rundeck/issues/602/events","html_url":"https://github.com/rundeck/rundeck/issues/602","id":23809012,"number":602,"title":"preserve quotes used in commands","user":{"login":"gschueler","id":55603,"avatar_url":"https://avatars.githubusercontent.com/u/55603?v=3","gravatar_id":"","url":"https://api.github.com/users/gschueler","html_url":"https://github.com/gschueler","followers_url":"https://api.github.com/users/gschueler/followers","following_url":"https://api.github.com/users/gschueler/following{/other_user}","gists_url":"https://api.github.com/users/gschueler/gists{/gist_id}","starred_url":"https://api.github.com/users/gschueler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gschueler/subscriptions","organizations_url":"https://api.github.com/users/gschueler/orgs","repos_url":"https://api.github.com/users/gschueler/repos","events_url":"https://api.github.com/users/gschueler/events{/privacy}","received_events_url":"https://api.github.com/users/gschueler/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rundeck/rundeck/labels/bug","name":"bug","color":"e10c02"},{"url":"https://api.github.com/repos/rundeck/rundeck/labels/enhancement","name":"enhancement","color":"02d7e1"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/rundeck/rundeck/milestones/14","html_url":"https://github.com/rundeck/rundeck/milestones/2.x","labels_url":"https://api.github.com/repos/rundeck/rundeck/milestones/14/labels","id":560428,"number":14,"title":"2.x","description":"next release of 2.x","creator":{"login":"gschueler","id":55603,"avatar_url":"https://avatars.githubusercontent.com/u/55603?v=3","gravatar_id":"","url":"https://api.github.com/users/gschueler","html_url":"https://github.com/gschueler","followers_url":"https://api.github.com/users/gschueler/followers","following_url":"https://api.github.com/users/gschueler/following{/other_user}","gists_url":"https://api.github.com/users/gschueler/gists{/gist_id}","starred_url":"https://api.github.com/users/gschueler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gschueler/subscriptions","organizations_url":"https://api.github.com/users/gschueler/orgs","repos_url":"https://api.github.com/users/gschueler/repos","events_url":"https://api.github.com/users/gschueler/events{/privacy}","received_events_url":"https://api.github.com/users/gschueler/received_events","type":"User","site_admin":false},"open_issues":20,"closed_issues":0,"state":"open","created_at":"2014-02-06T01:10:47Z","updated_at":"2015-04-22T18:15:01Z","due_on":null,"closed_at":null},"comments":12,"created_at":"2013-12-05T19:02:39Z","updated_at":"2015-05-08T16:40:18Z","closed_at":null,"body":"If a command has a quoted string e.g. `echo \" hi there\"`, the quotes are interpreted when read by rundeck, but not preserved literally on output.  Current rules require double-quoting of input strings to emit literal quotes: <http://rundeck.org/docs/manual/job-workflows.html#quoting-arguments-to-steps>\r\n\r\nSuggested enhancement to make this more intuitive:\r\n\r\nif an argument string has spaces and is not quoted (and is does not contain variable expansion like `${option.value}`, it should be emitted quotes added"},"comment":{"url":"https://api.github.com/repos/rundeck/rundeck/issues/comments/100289506","html_url":"https://github.com/rundeck/rundeck/issues/602#issuecomment-100289506","issue_url":"https://api.github.com/repos/rundeck/rundeck/issues/602","id":100289506,"user":{"login":"looprock","id":187808,"avatar_url":"https://avatars.githubusercontent.com/u/187808?v=3","gravatar_id":"","url":"https://api.github.com/users/looprock","html_url":"https://github.com/looprock","followers_url":"https://api.github.com/users/looprock/followers","following_url":"https://api.github.com/users/looprock/following{/other_user}","gists_url":"https://api.github.com/users/looprock/gists{/gist_id}","starred_url":"https://api.github.com/users/looprock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/looprock/subscriptions","organizations_url":"https://api.github.com/users/looprock/orgs","repos_url":"https://api.github.com/users/looprock/repos","events_url":"https://api.github.com/users/looprock/events{/privacy}","received_events_url":"https://api.github.com/users/looprock/received_events","type":"User","site_admin":false},"created_at":"2015-05-08T16:40:18Z","updated_at":"2015-05-08T16:40:18Z","body":"I'm migrating a command line job from 1.6 to 2.5 (yeah, big jump I know), and it appears the double quotes aren't being honored anymore.\r\n\r\n\r\nThis is the command line:\r\n/var/lib/rundeck/scripts/createvms.test -u ${option.user} -s \"Small VM\" -p devbox -r NULL -n ${option.hostname} -c preprod -d\r\n\r\nIf I output in the script I see -s is only being interpreted as only 'Small'.\r\n\r\nIf I change the command line to:\r\n/var/lib/rundeck/scripts/createvms.test -u ${option.user} -s '\"Small VM\"' -p devbox -r NULL -n ${option.hostname} -c preprod -d (wrapping the whole thing in single quotes)\r\n\r\nThings work as they used to in 1.6.\r\n\r\nI've been poking around and the workflow quotes section matches in 1.6 and 2.5 (and 2.4 before that). Does anyone have an idea what might be going on?\r\n\r\nI have ~500 commandline options I'm going to need to modify if I can't figure this out, which I'm not looking forward to. Thanks!"}}