Skip to content

Instantly share code, notes, and snippets.

@jdee
Last active November 16, 2017 20:19
Show Gist options
  • Save jdee/a2140bb12672091001ed93a7b74d6542 to your computer and use it in GitHub Desktop.
Save jdee/a2140bb12672091001ed93a7b74d6542 to your computer and use it in GitHub Desktop.
Shell escapes in a Fastfile
url = "https://www.google.com"
content_type = "content-type: application/json"
data = %q({"title": "What's New"})
output = sh "curl -X POST #{url.shellescape} -H #{content_type.shellescape} -d #{data.shellescape}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment