Skip to content

Conversation

@superimposition
Copy link
Contributor

std::process::Command.output() doesn't return error on non-zero exit, only when command.inner() fails.

If which nvcc can't find nvcc it returns like { ExitStatus(-1), "", "" } and causes a panic in the return of the function.

Instead, we should rather panic on non-zero return with an informational diagnostic message.

Seems like this can probably be lumped into PR #143 if we'd like to stuff one PR full of build fixes.
Let me know if we'd rather not panic here and I can see about adapting things to handle the null string.

std::process::Command.output() doesn't return error on non-zero exit, only
when command.inner() fails.

If `which nvcc` can't find `nvcc` it returns like (ExitStatus(-1), "", "")
and causes a panic in the return of the function.

Instead, panic on non-zero return with an informational diagnostic message.
@LegNeato
Copy link
Contributor

LegNeato commented Mar 8, 2025

Great, thanks for the PR! 🍻

@LegNeato LegNeato merged commit 34df9c7 into Rust-GPU:main Mar 8, 2025
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants