Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7068331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:18:39+00:00 2026-05-28T05:18:39+00:00

I have a fabric task set up like this: @task def cli(): command =

  • 0

I have a fabric task set up like this:

@task
def cli():
    command = [
        os.path.join(env.servers_path, "bin", "redis-cli"),
    ]

    run(" ".join(command))

Running it gives me a prompt, but no interactivity:

$ fab cli                                            
[server] Executing task 'cli'

[server] Executing task 'redis.cli'
[server] run: /path/to/bin/redis-cli
[server] out: redis 127.0.0.1:6379> help
<no output produced>

Typing further produces an “out: ” prompt that I type onto, but at no point do I get anything back from redis.

However, if I change to some other interactive prompt, I do get interactivity:

@task
def cli():
    command = [
        "python"
    ]

    run(" ".join(command))

produces:

$ fab cli                                            
[server] Executing task 'cli'
[server] run: python
[server] out: Python 2.4.3 (#1, Sep  3 2009, 15:37:37) 
[server] out: [GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
[server] out: Type "help", "copyright", "credits" or "license" for more information.
[server] out: >>> a = 1
[server] out: >>> a
[server] out: 1
[server] out: >>> 

Can anyone offer me any hints as to why redis-cli doesn’t behave nicely? I’d like to open a bug with that project, but I’d like to understand it better first.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T05:18:39+00:00Added an answer on May 28, 2026 at 5:18 am

    I think this is due to the fact redis-cli in interactive mode is really designed to work with a terminal, while fabric probably runs redis-cli redirecting standard input/output file descriptors.

    For instance, the following command works fine:

    python | cat
    

    while the following one does not:

    redis-cli | cat
    

    redis-cli and the linenoise library providing readline-like facilities do not flush correctly the output with a non terminal file descriptor. A possible workaround which I have not tried with fabric, is to deactivate linenoise:

    TERM=dumb redis-cli | cat
    

    By defining the TERM variable to dumb, linenoise defaults on a very basic code path which happens to use a simple printf to deal with the prompt and flush the output just after its display. It may solve your issue with fabric provided you can set this variable in the process environment.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Fabric task that needs to access the settings of my Django
I have the following fabfile.py: from fabric.api import env, run host1 = '192.168.200.181' host2
I'd like my Fabric tasks to have hyphens (-) instead of underscores (_). For
What I want to do is something like this: template.py def dummy_func(): print(VAR) #
Have you managed to get Aptana Studio debugging to work? I tried following this,
i have A bunch of fabric patterns (simple jpg files) An image for every
We have a complex fabric BPM solution. We now want to expose the fabric
I have a fabric script that attempts to run the tests for an application
I have been trying to us the app fabric caching on a win2008 standard
I have a django app and I wrote a fabric script that installs my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.