Skip to content

Prompt displays several times #418

Description

@pitakill

Describe the bug

When the cli prompts to select an option if I click down or up to select one, it repeats the output again and again.

Screenshot_2020-02-13_09-49-45

$ gh --version
gh version 0.5.4 (2020-02-13)
https://github.com/cli/cli/releases/tag/v0.5.4

Steps to reproduce the behavior

  1. Create a new PR with the cli
  2. Try to select between Open the preview in the Browser and Create the PR
  3. See multiple times the prompt

Expected vs actual behavior

The expected behavior is only one prompt and select the options in that prompt

Logs

Paste the activity from your command line. Redact if needed.

Activity

  1. billygriffin commented on Feb 13, 2020

    @billygriffin
    Contributor

    😱 Whoa, this isn't something we've seen or are able to reproduce. Would you mind sharing how you installed gh and what OS you're using, and maybe any additional information you think might be relevant for us to figure out what's going on here?

  2. pitakill commented on Feb 13, 2020

    @pitakill
    Author

    Sure!

    My system is:

    Linux euler 5.5.3-arch1-1 #1 SMP PREEMPT Tue, 11 Feb 2020 15:35:41 +0000 x86_64 GNU/Linux

    I've installed the command from the AUR https://aur.archlinux.org/packages/github-cli/

    My go version is:

    go version go1.13.7 linux/amd64

    And maybe this issue in one of the dependencies has a similar output (but not the same): AlecAivazis/survey#101

  3. added
    bugSomething isn't working
    priority-3Affects a small number of users or is largely cosmetic
    and removed
    more-info-neededMore info needed from user/contributor
    on Feb 13, 2020
  4. tierninho commented on Feb 13, 2020

    @tierninho
    Contributor

    @pitakill Thanks for reporting this. I was able to reproduce this on OSX and Linux. v0.5.4.

    The root cause is the width of your terminal window. If it is under the width of the "What's next..." sentence, then this happens when you attempt to select an option.

    Screen Shot 2020-02-13 at 12 03 21 PM

    Looks like the text is being cut-off when the window is too narrow, prompting the application to try and print it again -> loop.

    Screen Shot 2020-02-13 at 12 11 16 PM

  5. AliabbasMerchant commented on May 6, 2020

    @AliabbasMerchant
    Contributor

    I could also reproduce this bug (using Konsole in Fedora KDE Plasma)
    This is definitely a bug in the survey dependency, as the same version and code runs properly on another terminal (the vscode in-built terminal)
    It doesn't look like an issue with the terminal width. Konsole was full screen when I was using it, but still this error occurred. (While the vscode terminal was of smaller width than it, and it worked there)

  6. mislav commented on Sep 16, 2020

    @mislav
    Contributor

    I think this was solved by an upgrade to the Survey library that we're using. Please comment if you can still reproduce this issue in trunk, or after the next release!

  7. marmorag commented on Nov 9, 2020

    @marmorag
    Contributor

    Hi, this bug still affect my version

    gh --version
    > gh version 1.2.0 (2020-10-27)
    > https://github.com/cli/cli/releases/latest

    ghcli_issue

    Do you have any clue or workaround on how to fix this ?
    Thanks.

  8. mislav commented on Nov 10, 2020

    @mislav
    Contributor

    @marmorag Hi, could you tell us more about your OS, terminal emulator, and viewport width inside the terminal?

    Often, you can use this command to measure terminal width: tput cols

  9. reopened this on Nov 10, 2020
  10. marmorag commented on Nov 10, 2020

    @marmorag
    Contributor

    I use Ubuntu 18.04.5 LTS with Konsole 17.12.3 terminal

    $ tput cols
    214
    
  11. added and removed
    more-info-neededMore info needed from user/contributor
    on Nov 10, 2020
  12. System-Glitch commented on Dec 16, 2020

    @System-Glitch

    This bug has been fixed in v2.2.5 of the survey library: AlecAivazis/survey#309

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-investigationCLI team needs to investigatepriority-3Affects a small number of users or is largely cosmetic

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions