fab-user
[Top][All Lists]
Advanced

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

[Fab-user] Setting $PATH with Fabric 1.6.0


From: Nathan Kleekamp
Subject: [Fab-user] Setting $PATH with Fabric 1.6.0
Date: Thu, 21 Mar 2013 08:37:57 -0400

I'm trying to run a command installed in my home directory on a remote server. It's in my $PATH on the remote server (via .bash_profile), but Fabric isn't seeing it. I've tried adding it to my $PATH using Fabric's path context manager like so:

def test_path():
    with path('/path/to/sources/drush'):
        run('echo $PATH')
        run('drush')

However, I'm getting:
Fatal error: run() received nonzero return code 127 while executing!

Fabric is executing: 
Executed: /bin/bash -l -c "export PATH=\"\$PATH:\"/home/kleekampnf/sources/drush\" \" && drush"

I think this is happening because the last dir in the path is being interpreted by bash as "/path/to/source/drush " (trailing space) - an invalid directory. I'm just wondering if this is a bug or a feature and I'm doing it wrong. 


Thanks,
Nathan

reply via email to

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