Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run_local doesn't respect prefixes #120

Open
rabialam opened this issue Dec 18, 2012 · 2 comments
Open

run_local doesn't respect prefixes #120

rabialam opened this issue Dec 18, 2012 · 2 comments

Comments

@rabialam
Copy link

No description provided.

@sebastien
Copy link
Owner

Hi! Could you please elaborate on this issue, I'm not sure to understand what the problem is. Thanks!

@rabialam
Copy link
Author

Sure thing. When you use run_local, it just creates a subprocess.Popen object, and executes that command line basically raw. I basically clipped a few lines from fabric.api.operations to wrap around any prefix contexts blocks that run_local is operating inside in, as well as any sudo context blocks. Otherwise, supposed I wanted to prefix a few blocks with something like this:

with prefix('workon myproj'):
    with prefix('cd subdir/dir'):
        run_local('pwd');

Without the fix, this would evaluate to bash -l -c "pwd" instead of the desired bash -l -c "workon myproj && cd subdir/dir && pwd".

Also, I made a small fix (though this commit is something different) to make the package installable via pip from a git commit number -- there's still an issue pip right now where if you use packages that have a directory structure with your main package inside of a src/<main_file.py> format, pip for some reason will only retain the version number instead of properly persisting the commit and repository url as it should, which causes a maintainability nightmare. Not sure if that particular commit belongs with this issue, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants