fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fab-user] cd context manager and put when the remote_path is None


From: Jeff Forcier
Subject: Re: [Fab-user] cd context manager and put when the remote_path is None
Date: Mon, 6 Aug 2012 10:50:52 -0700

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 <address@hidden> 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
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/fab-user
>



-- 
Jeff Forcier
Unix sysadmin; Python/Ruby engineer
http://bitprophet.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]