Bug #143

avatar

context manager PATH errors when using with run operation

Added by j pittman 169 days ago. Updated 63 days ago.

Status:Assigned Start:02/10/2010
Priority:Normal Due date:
Assigned to:avatarJeff Forcier % Done:

0%

Category:Core
Target version:0.9.2

Description

For example, the following code always errors out for me:

directory = "/tmp"
cmd = "ls"

def test1():
    with path(directory):
        run(cmd)

with the following:

[user@host] run: /bin/bash -l -c "PATH=\$PATH:\"/tmp\" ls"
[user@host] err: Unmatched ".

Warning: run() encountered an error (return code 1) while executing 'ls'

None

I'm working my way through the code right now and am currently looking at the _prefix_env_vars function to try and isolate a fix. Shells are quite finicky beasts and escaping commands is not always simple.

Attached is a test fabfile to illustrate more thoroughly what I'm seeing.

fabtest.py (441 Bytes) j pittman, 02/10/2010 04:06 PM

History

Updated by Jeff Forcier 169 days ago

avatar
  • Status changed from New to Assigned
  • Target version set to 0.9.1

Updated by Jeff Forcier 63 days ago

avatar
  • Target version changed from 0.9.1 to 0.9.2

Also available in: Atom