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

shell_env fails when using csh #1386

Closed
dgloe opened this issue Oct 1, 2015 · 2 comments
Closed

shell_env fails when using csh #1386

dgloe opened this issue Oct 1, 2015 · 2 comments
Labels

Comments

@dgloe
Copy link

@dgloe dgloe commented Oct 1, 2015

On Fabric 1.8.0 and python 2.7.9 shell_env fails with csh since it tries to use export instead of setenv.

dgloe@flubber-elogin1:~> cat fabrictest.py
import fabric.api

fabric.api.env.shell = '/usr/bin/csh -c'
fabric.api.env.host_string = 'localhost'

with fabric.api.shell_env(TEST='asdf'):
    fabric.api.run('echo $TEST')
dgloe@flubber-elogin1:~> python fabrictest.py
[localhost] run: echo $TEST
[localhost] Login password for 'dgloe':
[localhost] out: export: Command not found.
[localhost] out:


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

Requested: echo $TEST
Executed: /usr/bin/csh -c "export TEST=\"asdf\" && echo \$TEST"

Aborting.
@mradziej
Copy link

@mradziej mradziej commented Jul 7, 2016

I had similar problems and found a fix: You need to set backslash_quote in csh. See pull request #1483 . env.shell still needs to point to a working bash or sh. Feedback welcome.

@bitprophet
Copy link
Member

@bitprophet bitprophet commented Jul 19, 2016

Thanks @mradziej - rolling into the doc change in #1483.

@bitprophet bitprophet closed this Jul 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants