Strider-CD / strider-custom

Support for custom prepare, test and deploy phases in Strider
9 stars 7 forks source link

Prevent non-comment hashes from getting mangled #26

Closed xdissent closed 9 years ago

xdissent commented 9 years ago

Bash uses # for variable text substitution: http://www.tldp.org/LDP/abs/html/string-manipulation.html

URL="http://example.com"
HOST="${URL#http*://}"   # HOST="example.com"

This PR fixes command normalization to consider non-comment uses of #. It assumes a comment is a line beginning with zero or more whitespace characters followed by a #.

knownasilya commented 9 years ago

Thanks, wasn't aware of the alternate use of #.