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

Console.readline() prompt text is overwritten by status line #869

Open
benmccann opened this issue Nov 16, 2016 · 7 comments
Open

Console.readline() prompt text is overwritten by status line #869

benmccann opened this issue Nov 16, 2016 · 7 comments

Comments

@benmccann
Copy link
Contributor

@benmccann benmccann commented Nov 16, 2016

Migrated from https://issues.gradle.org/browse/GRADLE-3446

https://discuss.gradle.org/t/console-readline-does-not-print-text-if-run-from-dolast-with-gradle-2-13/17371
I have a script that ask for user input using System.console().readline('label'). The label is printed on console and the user can type something.

Your Environment

I upgraded from gradle 2.12 to 2.13 and now the first label I use in the task disappears.

Steps to Reproduce (for bugs)

This issue can be reproduced with the following code:

def console = System.console()
def firstname
def lastname

task run {
    doLast {
        firstname = console.readLine('> What is your first name?: ')
        lastname = console.readLine('> What is your last name?: ')
    }
}

Expected Behavior

With Gradle 2.12:

"gradle-2.12/bin/gradle" run
> Building 0% > :run> What is your first name?: John
> What is your last name?: Doe
:run

Current Behavior

With Gradle 2.13:

> "gradle-2.13/bin/gradle" run
> Building 0%> What is your > Building 0% > :runJohn
> What is your last name?: Doe
:run

The first label (> What is your first name?) is not showing.

Context

We are trying to prompt the user to enter their password. The password prompt is disappearing

@eriwen
Copy link
Member

@eriwen eriwen commented Nov 17, 2016

@benmccann Thanks very much for the well-written issue. I have confirmed this continues to affect Gradle 3.2.

@fernandorubbo
Copy link

@fernandorubbo fernandorubbo commented Nov 27, 2016

@eriwen is there any plan to fix this? we are waiting this fix for a long time now.

@eriwen
Copy link
Member

@eriwen eriwen commented Nov 28, 2016

@fbrubbo Fixing this issue is currently unscheduled; however, if you use Zenhub it is in our Backlog which means it is much more likely to be picked up in the next couple releases.

We welcome contributions to our free, open-source project if you are passionate about this issue.

@dant3
Copy link
Contributor

@dant3 dant3 commented Jun 22, 2017

I can confirm this issue still exists in Gradle 4.0

@samsieber
Copy link

@samsieber samsieber commented Jun 29, 2017

As a work around, you can use
--conosle plain
as cli args to gradle and it won't happen... but that's just one more thing to ask users to do :(

@eriwen
Copy link
Member

@eriwen eriwen commented Jun 29, 2017

One can also set environment TERM=dumb @samsieber

@bmuskalla bmuskalla added this to the Unscheduled milestone Jun 4, 2020
@jjohannes jjohannes removed this from the Unscheduled milestone Mar 19, 2021
@stale
Copy link

@stale stale bot commented Apr 16, 2022

This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. If you're interested in how we try to keep the backlog in a healthy state, please read our blog post on how we refine our backlog. If you feel this is something you could contribute, please have a look at our Contributor Guide. Thank you for your contribution.

@stale stale bot added the stale label Apr 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants