about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCallum Leslie <git@cleslie.uk>2022-08-01 12:04:56 +0100
committerCallum Leslie <git@cleslie.uk>2022-08-01 13:33:59 +0100
commitfcf1f958aca7c46939911f52a0093fca7e5c2a80 (patch)
tree73d8a135f63e0f7a8e953e871a2f2f4234a9fcae
parent1f5d8d49eb6111931091f700d07518cd2b80bc18 (diff)
downloadrust-fcf1f958aca7c46939911f52a0093fca7e5c2a80.tar.gz
rust-fcf1f958aca7c46939911f52a0093fca7e5c2a80.zip
fix: better error when python not found in x
chore: clean comments to be relevant
-rw-r--r--src/tools/x/src/main.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tools/x/src/main.rs b/src/tools/x/src/main.rs
index 57d548f313d..9187c3551d7 100644
--- a/src/tools/x/src/main.rs
+++ b/src/tools/x/src/main.rs
@@ -41,9 +41,9 @@ fn python() -> &'static str {
     } else if python2 {
         PYTHON2
     } else {
-        // We would have returned early if we found that python is installed ...
-        // maybe this should panic with an error instead?
-        PYTHON
+        // Python was not found on path, so exit
+        eprintln!("Unable to find python in your PATH. Please check it is installed.");
+        process::exit(1);
     }
 }