Closed MuschPusch closed 10 years ago
Hey,
I have just managed to make it work by setting env.use_shell = False
in my fabfile, and --no-pty
on the command-line.
Here is my fabfile:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from fabric.api import *
import sys
env.user = 'machi'
env.hosts = ['localhost']
env.use_shell = False
@task
def testing():
run("ls")
Running:
mazzika:/tmp$ fab --no-pty -f fabtest.py testing
[localhost] Executing task 'testing'
[localhost] run: ls
[localhost] out: Desktop
...
[localhost] out: Videos
[localhost] out:
Done.
Disconnecting from localhost... done.
Hope this helps!
thanks a lot!
Hey, do you know if it's possible in some way to use fabric to execute commands in a lshell environment? I tried setting up the environment shell in fabric to '/usr/bin/lshell' but it doesn't work.