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

csh and path() Context Manager #1300

lucacorti opened this Issue Mar 31, 2015 · 5 comments


None yet
4 participants

lucacorti commented Mar 31, 2015


the path context manager seems to fail when trying to append path on FreeBSD/csh containing unescaped characters like $, ~ and .. It also seems to add unneeded extra quotes.

E.g., with bower installed locally:

def staging()
... = '~/'
    env.venv_activate = 'bin/activate.csh'
    env.venv = + 'venv/'
    env.use_shell = False
    env.add_to_path = [ + 'node_modules/bower/bin', + 'node_modules/uglifyjs/bin', + 'node_modules/yuglify/bin',
def deploy()
    with cd(, prefix('source ' + env.venv + env.venv_activate), path(":".join(env.add_to_path)):'npm install')'bower install')

fab staging deploy


[freebsd] run: npm install
[freebsd] out: Bad : modifier in $ (").
[freebsd] out: 

Fatal error: run() received nonzero return code 1 while executing!

Requested: npm install
Executed: cd ~/ && source ~/venv/bin/activate.csh && export PATH="$PATH:"~/node_modules/bower/bin/:~/node_modules/yuglify/bin/:~/node_modules/uglify-js/bin/"" && npm install

also export is probably not working anyway in csh, should be setenv I think.


This comment has been minimized.

lucacorti commented Mar 31, 2015

Forgot to mention I'm on Python 2.7.9, Fabric 1.10.1.


This comment has been minimized.

jeamland commented Apr 13, 2015

It looks like something somewhere is over-quoting the path string. In the "Executed" line, we see:

[...] export PATH="$PATH:"[...]"" [...]

i.e. we're opening quotes before $PATH, then opening again after the : (causing csh to complain) and then closing both sets at the end.


This comment has been minimized.

mradziej commented Jul 7, 2016

csh behaviour with quoting and backslashes is strange. I had similar problems and found a fix: You need to set backslash_quote in csh. See pull request #1483. Feedback welcome.


This comment has been minimized.


bitprophet commented Jul 19, 2016

Please comment if the setting from #1483 is insufficient and we can reopen - thanks! (Though - I'll note that Fabric 1's aggressively "helpful" autoquoting is generally problematic and won't be present by default in 2.x.)

@bitprophet bitprophet closed this Jul 19, 2016


This comment has been minimized.

lucacorti commented Jul 20, 2016

Still getting the same error. However I'm not currently using path() so I'm fine with leaving it this way and eventually retesting on 2.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment