|
From: | Issa Ashwash |
Subject: | Re: [Fab-user] lcd seems broken |
Date: | Wed, 30 Sep 2015 17:42:36 -0400 |
This context manager is identical tocd
, except that it changes a different env var (lcwd
, instead ofcwd
) and thus only affects the invocation oflocal
and the local arguments toget
/put
.
>>> local('pwd')
[localhost] local: pwd
/home/issa
''
>>> with lcd("/usr/bin"):
... local('pwd')
...
[localhost] local: pwd
/usr/bin
''
>>>
--Paul HoffmanIs this what is expected?...prints the same location name twice, and it is clear that the cd didn't happen.print(os.getcwd())...but maybe it is just me.print(os.getcwd())with lcd("/usr/bin"):print(os.getcwd())with lcd("/does/not/exist"):
print(os.getcwd())
...prints the same location name twice. lcd doesn't throw an error, which I would have thought it would.
_______________________________________________
Fab-user mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/fab-user
[Prev in Thread] | Current Thread | [Next in Thread] |