nabijaczleweli / cargo-update

A cargo subcommand for checking and applying updates to installed executables
MIT License
1.22k stars 42 forks source link

No color on cargo messages #136

Closed pickfire closed 4 years ago

pickfire commented 4 years ago
    Updating registry 'https://github.com/rust-lang/crates.io-index'

does not have color. It would be good to show the cargo version with color on an interactive terminal.

nabijaczleweli commented 4 years ago

Following what that funxion has already been through, I don't think there's much point in mimicking even more parts of cargo (isatty(), presumably, but then what does that make of Win32, also --color=always,auto,never, &c., &c.), especially for something as trite as colours in an insignificant part of the output. If cargo supported update-registry (which it won't: https://github.com/rust-lang/cargo/pull/5961), I'd just fork+exec that, but otherwise meh.

pickfire commented 4 years ago

Is it possible to pull cargo as a library or some sort to just run cargo's code directly? Or maybe just force --color=always when the user is in an interactive terminal?

nabijaczleweli commented 4 years ago

There's a reason I'm not using libcargo (it's a fucking behemoth, and as stable as Rust (not very)). I'm not going to send rogue escapes to teletypes that don't understand them (which is most).

I don't really see why this matters, anyway?