New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

files.append not detecting lines present if ~ used #367

bitprophet opened this Issue Aug 19, 2011 · 0 comments


None yet
1 participant

bitprophet commented Aug 19, 2011


The files.append always appends the lines, whether they're present or not.

It appears a tilde in the path is a factor.

def test_append():
    files.append('~/lines', ['line1', 'line2'])

Replaced '~/lines' with 'lines' and it behaves as expected. It is the file presence detection that is failing:

Commands to run: test_append
[] Executing task 'test_append'
[] run: /bin/bash -l -c "test -e \"~/lines\""
[] run: /bin/bash -l -c "echo 'line1' >> ~/lines"
[] run: /bin/bash -l -c "test -e \"~/lines\""
[] run: /bin/bash -l -c "echo 'line2' >> ~/lines"

As you can see, even after the first command is run, it fails to detect the file. I've replicated this on Ubuntu 10.04 and the redhat variant at Bluehost.

Originally submitted by Jason R. Coombs (jaraco) on 2011-06-24 at 01:55pm EDT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment