Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
append() does not respect current content if line contains '<' #1294
I noticed that if I run append() several times with the same content it also appends that line several times, instead of just one time. That is, append() is not idempotent.
The following small test script can reproduce the issue:
from fabric.contrib.files import append def run(): append('testfile', 'some < pipe')
This issue seems to be similar to #341
The error has to do with the '<' symbol.
The problem seems to boil down to the regex that is sent to egrep in contains():
printing egrep_cmd gives me the following for the above testcase:
However the correct regex would be:
The incorrect regex seems to be generated by the