]> git.lizzy.rs Git - rust.git/commitdiff
when xargo is manually specified, don't try to upgrade it
authorRalf Jung <post@ralfj.de>
Mon, 21 Oct 2019 08:25:47 +0000 (10:25 +0200)
committerRalf Jung <post@ralfj.de>
Mon, 21 Oct 2019 08:25:47 +0000 (10:25 +0200)
src/bin/cargo-miri.rs

index cf513bc1d2695324f8d956afb8bde8fbe36931e5..b889ce52f386d5c1c65bda34039abc111ad6d980 100644 (file)
@@ -259,6 +259,10 @@ fn setup(ask_user: bool) {
 
     // First, we need xargo.
     if xargo_version().map_or(true, |v| v < (0, 3, 16)) {
+        if std::env::var("XARGO").is_ok() {
+            // The user manually gave us a xargo binary; don't do anything automatically.
+            show_error(format!("Your xargo is too old; please upgrade to the latest version"))
+        }
         let mut cmd = cargo();
         cmd.args(&["install", "xargo", "-f"]);
         ask_to_run(cmd, ask_user, "install a recent enough xargo");