This is a known bug: https://github.com/fabric/fabric/pull/370
There was a patch submitted but it was insufficiently rigorous re: edge cases and there hasn't been effort since then. If someone is able to extend the patch with more attention to edge cases I'll merge it :) -Jeff On Mon, Aug 6, 2012 at 8:39 AM, Greg Hunt <greg.h...@predictix.com> wrote: > I've noticed that put does not adhere to the cd context manager when the > remote_path is None. Is this expected behavior? > > For example: > > with fabric.api.settings(**settings): > with fabric.api.cd('/mnt/worker'): > fabric.api.run('pwd') > fabric.api.put('test.ini') > fabric.api.put('test.ini', '.') > fabric.api.put('test.ini', 'foo') > > yields the output: > > $ python test.py > [localhost] run: pwd > [localhost] out: /mnt/worker > > [localhost] put: test.ini -> /home/pdxtest/test.ini > [localhost] put: test.ini -> /mnt/worker/./test.ini > [localhost] put: test.ini -> /mnt/worker/foo > > > My expectation is that the first call to put should have copied the file to > /mnt/worker and not to the home directory. The other two put calls behaved > as I expected. > > I assume that get will have the same behavior, but I have not tested it yet. > > Thanks, > Greg Hunt > > > > _______________________________________________ > Fab-user mailing list > Fab-user@nongnu.org > https://lists.nongnu.org/mailman/listinfo/fab-user > -- Jeff Forcier Unix sysadmin; Python/Ruby engineer http://bitprophet.org _______________________________________________ Fab-user mailing list Fab-user@nongnu.org https://lists.nongnu.org/mailman/listinfo/fab-user