rust-lang / rust-lang/rustup

rustup-init leaves user with colored terminal

Open
#2,590 29 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug help wanted O-windows
Dominant language
Rust
Stars
7k
Forks
1.1k
Avg merge
22h 40m
Merged PRs (30d)
46

Description

(If this doesn't belong here, please tell me which repo to move it to, thanks!)

Problem

rustup's setup script, rustup-init, leaves the user with a colored terminal when exiting interrupted.

Steps

  1. Execute rustup-init
  2. At the first prompt, interrupt by Ctrl-C
  3. User's shell is now red.

Possible Solution(s)
Check the interrupted-exit code maybe? Make sure that the color is reset before exiting (Since ^C is displayed in red)

Notes

OS: Win 10 (1909)
Output of rustup --version: rustup 1.23.0 (00924c9ba 2020-11-27)
Output of rustup-init --version: rustup-init 1.22.1 (b01adbbc3 2020-07-08)
Output of rustup show:

Default host: x86_64-pc-windows-msvc
rustup home:  C:\Users\kangj\.rustup

installed toolchains
--------------------

stable-x86_64-pc-windows-msvc
nightly-x86_64-pc-windows-msvc (default)

active toolchain
----------------

nightly-x86_64-pc-windows-msvc (default)
rustc 1.48.0-nightly (6af1bdda5 2020-09-15)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the rustup-init entry point and reproduce the Windows terminal state by interrupting the first prompt with Ctrl-C. Trace the interrupted-exit path and verify that the terminal color is reset before exit; done means the shell is no longer red after the interruption.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.