Skip to content

Commit

Permalink
don't prefix crabs on cargo gpu show output
Browse files Browse the repository at this point in the history
  • Loading branch information
schell committed Dec 27, 2024
1 parent 40d1380 commit dbf193e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions crates/cargo-gpu/src/show.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,22 @@ impl Show {
/// Entrypoint
pub fn run(self) -> anyhow::Result<()> {
log::info!("{:?}: ", self.command);

#[expect(
clippy::print_stdout,
reason = "The output of this command could potentially be used in a script, \
so we _don't_ want to use `crate::user_output`, as that prefixes a crab."
)]
match self.command {
Info::CacheDirectory => {
crate::user_output!("{}\n", cache_dir()?.display());
println!("{}\n", cache_dir()?.display());
}
Info::SpirvSource(SpirvSourceDep { shader_crate }) => {
let rust_gpu_source =
crate::spirv_source::SpirvSource::get_spirv_std_dep_definition(&shader_crate)?;
crate::user_output!("{rust_gpu_source}\n");
{
println!("{rust_gpu_source}\n");
}
}
}

Expand Down

0 comments on commit dbf193e

Please sign in to comment.