Skip to content

Commit 058ea7a

Browse files
authored
Rollup merge of #100020 - CallumIO:issue-99648, r=jyn514
better error when python is not found in x - issue #99648 `x` now shows an appropriate error message and exits, when a version of `python` is not found on the users `PATH`. Resolves #99648
2 parents 4606830 + fcf1f95 commit 058ea7a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/tools/x/src/main.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ fn python() -> &'static str {
4141
} else if python2 {
4242
PYTHON2
4343
} else {
44-
// We would have returned early if we found that python is installed ...
45-
// maybe this should panic with an error instead?
46-
PYTHON
44+
// Python was not found on path, so exit
45+
eprintln!("Unable to find python in your PATH. Please check it is installed.");
46+
process::exit(1);
4747
}
4848
}
4949

0 commit comments

Comments
 (0)