rust-lang / rust-lang/rustup

Rustup output should end with a newline

Open
#2,243 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Problem
Rustup's output ends with a  after its last newline.

But command-line tools are typically expected to end their output with a newline.

In a CLI context, this doesn't matter as that character sequence "resets" the color without producing visible output. But in a log-parsing context this does matter, as the next line has this weird escape-sequence prefix. This caused a (minor) bug here. The output looked like

info: (Bdownloading component 'rustfmt'
info: (Binstalling component 'rustfmt'
[taskcluster 2019-06-10 16:36:58.754Z] === Task Finished ===
[taskcluster 2019-06-10 16:36:58.755Z] Successful task run with exit code: 0 completed in 238.573 seconds

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

No source file or test is named in the issue. Start by reproducing rustup output in a log-parsing context and trace the CLI output path that emits the final reset sequence. Done means rustup output ends with a newline without leaving the escape sequence as the next line's prefix.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.