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
Can't create PRs from screen sessions #4739
Comments
Hi, thanks for reporting! I cannot reproduce. I have gh 2.2 and screen on Ubuntu and even though TERM is |
I could reproduce it in the one screen session (even if I reattached it to a new terminal), and that session hadn't done anything "weird" AFAIK that might've put it in a bad state. But since then I too haven't been able to make it happen again. If I can't make this happen again today, I'll chalk this up to a transient issue and close this out. |
Still can't repro. Terminal must've gotten into a bad state in a way I didn't notice. |
I have one open tmux pane with this issue. Is there anything I could do to help find the cause for this (before I close that pane)? |
@corani Yes, can you tell us your Even if we don't manage to find the root cause for this, I think that's okay because it doesn't seem to be widespread and it only seems to be affecting terminals stuck in some weird state. I think there is a high chance we might never directly address this from GitHub CLI, but any data points are useful for posterity. Thank you! |
Output:
Note:
|
Thanks for the info! I can't spot what's wrong with this terminal session, but it's curious that Survey gets an EOF when reading from In a bash shell, can you make a bash prompt and answer a value to it? read -p "Input: " |
Yep, that works fine: $ read -p "Input: " && echo "${REPLY}"
Input: test
test |
I can reproduce the issue but now it also occurs with other wiki on main
❯ echo $TERM
xterm-256color
wiki on main
❯ gh pr create
Creating pull request for leapofazzam123:main into main in osdev-wiki/wiki
? Title (use pmarsceill/just-the-docs as the theme) EOF
wiki on main
❯ [47;88R[47;53R^C
wiki on main
❯ TERM=screen gh pr create
Creating pull request for leapofazzam123:main into main in osdev-wiki/wiki
? Title (use pmarsceill/just-the-docs as the theme) EOF
^[[47;88R^[[47;53R⏎
wiki on main
❯ [47;88R[47;53R^C
wiki on main
❯ TERM=dumb gh pr create
Creating pull request for leapofazzam123:main into main in osdev-wiki/wiki
? Title (use pmarsceill/just-the-docs as the theme) EOF
wiki on main
❯ [47;88R[47;53R^C
wiki on main
❯ TERM=sinxyebdgwibwysus gh pr create
warning: Could not set up terminal.
warning: TERM environment variable set to 'sinxyebdgwibwysus'.
warning: Check that this terminal type is supported on this system.
warning: Using fallback terminal type 'ansi'.
warning: Could not set up terminal.
warning: TERM environment variable set to 'sinxyebdgwibwysus'.
warning: Check that this terminal type is supported on this system.
warning: Using fallback terminal type 'ansi'.
Creating pull request for leapofazzam123:main into main in osdev-wiki/wiki
? Title (use pmarsceill/just-the-docs as the theme) EOF
^[[47;88R^[[47;53R⏎
wiki on main
❯ [47;88R[47;53R^C
wiki on main
❯ |
Looks like it also happens with other commands that has interactive prompts
|
I recently got this issue when I want to create a repository. Restarting the terminal fixes this problem. |
This comment was marked as spam.
This comment was marked as spam.
I've hit this again ... except in a different app (one of my own creation) which uses the same Edit: I can repeatably reproduce this now, with this sequence:
|
@mgabeler-lee-6rs Thank you for sharing! Those steps are indeed a doozy, and based on how obscure this is I don't think we can prioritize fixing this right now. However, you should feel free to also report this to the Survey repository, since the problem is actually there. What Survey basically does is scans Do any other tools work that take stdin? E.g.
|
After a deeeeep dive, I figured out the problem in the survey library. Issue is here, will be submitting a PR to fix it in that library shortly: AlecAivazis/survey#408 Edit: PR with fix: AlecAivazis/survey#409 |
Upstream has tagged a release with the fix for this: https://github.com/AlecAivazis/survey/releases/tag/v2.3.3 |
@mgabeler-lee-6rs Thank you for the update and for the upstream fix! I've merged the Survey upgrade to trunk #5337 and will now close this since the fix will ship in the next release. |
Describe the bug
gh pr create --draft
exits with EOF on the "where should we push" prompt when run on Linux withTERM=screen
orscreen.xterm-256color
, but not withxterm-256color
gh --version
:gh version 2.2.0 (2021-10-25)
Steps to reproduce the behavior
screen
gnome-terminal
so the terminal inside the screen hasTERM=screen.xterm-256color
gh pr create --draft
Expected vs actual behavior
Expected: Should allow me to answer the "Where should we push ..." prompt normally
Actual: Prints the prompt, then immediately prints an EOF error and exits.
Sometimes gets worse: occasionally spews garbage into my terminal input stream -- as if it sent some "please send me back the X info" to the terminal, and then exited before it go the reply, and so the terminal ends up sending that to my shell. The "garbage" in this case is a mix of alpha-numerics and colons/semicolons I think (don't have one handy however, will update if/when I get one)
Logs
The text was updated successfully, but these errors were encountered: