cloud-gov / pages-build-container

A container image that builds each site as part of the Pages platform
Other
14 stars 11 forks source link

An apostrophe in a comment of a custom config will break a jekyll build #89

Closed jseppi closed 6 years ago

jseppi commented 6 years ago

Very strange bug, but it seems like if you have a custom config that has a comment that has an apostrophe in it, like

# my custom config
# this is tom's key:
key: 12345

Then the jekyll build will fail. Currently unsure why it fails on the apostrophe given that it is in a commented line.

jseppi commented 6 years ago

The root problem is in the run_task method, which shells out with the custom config as a command-line flag argument. A single quote in a custom config is thus essentially on the command line, which is why a bash error is thrown.

https://github.com/18F/federalist-garden-build/blob/bae7993d289ec1a967e8040aa0011a70f17bb922/tasks/main.py#L66-L80