{"action":"created","issue":{"url":"https://api.github.com/repos/mitchellh/packer/issues/2229","labels_url":"https://api.github.com/repos/mitchellh/packer/issues/2229/labels{/name}","comments_url":"https://api.github.com/repos/mitchellh/packer/issues/2229/comments","events_url":"https://api.github.com/repos/mitchellh/packer/issues/2229/events","html_url":"https://github.com/mitchellh/packer/pull/2229","id":88042772,"number":2229,"title":"provisioner/shell: escape single quotes [GH-2067]","user":{"login":"mitchellh","id":1299,"avatar_url":"https://avatars.githubusercontent.com/u/1299?v=3","gravatar_id":"","url":"https://api.github.com/users/mitchellh","html_url":"https://github.com/mitchellh","followers_url":"https://api.github.com/users/mitchellh/followers","following_url":"https://api.github.com/users/mitchellh/following{/other_user}","gists_url":"https://api.github.com/users/mitchellh/gists{/gist_id}","starred_url":"https://api.github.com/users/mitchellh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitchellh/subscriptions","organizations_url":"https://api.github.com/users/mitchellh/orgs","repos_url":"https://api.github.com/users/mitchellh/repos","events_url":"https://api.github.com/users/mitchellh/events{/privacy}","received_events_url":"https://api.github.com/users/mitchellh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-13T18:12:15Z","updated_at":"2015-06-13T19:33:45Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mitchellh/packer/pulls/2229","html_url":"https://github.com/mitchellh/packer/pull/2229","diff_url":"https://github.com/mitchellh/packer/pull/2229.diff","patch_url":"https://github.com/mitchellh/packer/pull/2229.patch"},"body":"Fixes #2067 \r\n\r\nEscapes single quotes since we wrap everything in single quotes. Hard to unit test, you can verify with the null builder:\r\n\r\n```\r\n{\r\n    \"builders\": [{\r\n        \"type\": \"null\",\r\n        \"host\": \"127.0.0.1\",\r\n        \"ssh_username\": \"USER\",\r\n        \"ssh_password\": \"PASS\"\r\n    }],\r\n\r\n    \"provisioners\": [{\r\n        \"type\": \"shell\",\r\n        \"environment_vars\": [\"FOO=bar's\"],\r\n        \"inline\": \"echo $FOO\"\r\n    }]\r\n}\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/mitchellh/packer/issues/comments/111742388","html_url":"https://github.com/mitchellh/packer/pull/2229#issuecomment-111742388","issue_url":"https://api.github.com/repos/mitchellh/packer/issues/2229","id":111742388,"user":{"login":"sethvargo","id":408570,"avatar_url":"https://avatars.githubusercontent.com/u/408570?v=3","gravatar_id":"","url":"https://api.github.com/users/sethvargo","html_url":"https://github.com/sethvargo","followers_url":"https://api.github.com/users/sethvargo/followers","following_url":"https://api.github.com/users/sethvargo/following{/other_user}","gists_url":"https://api.github.com/users/sethvargo/gists{/gist_id}","starred_url":"https://api.github.com/users/sethvargo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sethvargo/subscriptions","organizations_url":"https://api.github.com/users/sethvargo/orgs","repos_url":"https://api.github.com/users/sethvargo/repos","events_url":"https://api.github.com/users/sethvargo/events{/privacy}","received_events_url":"https://api.github.com/users/sethvargo/received_events","type":"User","site_admin":false},"created_at":"2015-06-13T19:33:45Z","updated_at":"2015-06-13T19:33:45Z","body":":+1: "}}