huak
huak copied to clipboard
Printing to stdout
Currently most of huak
operations print to stderr. An example of a command that should probably print to stdout would be huak version
.
I'd be willing to try helping, but I see on line 116 of huak_python.../src/sys.rs that this is intentional.
/// NOTE: Messages are printed to stderr. This is behavior cargo implements as well to
/// avoid polluting stdout for end users. See <https://github.com/rust-lang/cargo/issues/1473>.
fn print(
&mut self,
status: &dyn Display,
message: Option<&dyn Display>,
color: Color,
justified: bool,
) -> HuakResult<()> {
match self.options.verbosity {
Verbosity::Quiet => Ok(()),
_ => self
.output
.message_stderr(status, message, color, justified),
}
}
I hope someone will let me know if this is something I could potentially help change. Thank you in advance!
Hi! huak version
would make sense in stdout. I'm sure there are others, but that's definitely one. The idea is that huak version
is often the type of command to be used to capture versions of projects.
Awesome! I'll see what I can do this week. Thank you!
Hey just a heads up I'm planning to refactor quite a bit in order to make some of the stuff I want to work on easier to do. So it might be better to hold off until that refactor work is done.
Great, will do. I noticed a lot changed when I debased my local copy today...
I'll be working on #718. There's more to refactor, but I probably won't refactor until I've implemented that. I'm treating it as a separate binary for now, then I'll refactor shared components out after it's done.