diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2021-02-15 22:46:58 +0100 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2021-02-15 22:48:33 +0100 |
| commit | 8f1cceb6ffe1324d403702e2ccf48d96a74eb33b (patch) | |
| tree | 7a5dc2492ee7ee0b5b5566f998e7fcc1f35ec76d /clippy_dev | |
| parent | f8dbcae9f42e7f238595fe604c1bfccba64b510e (diff) | |
| download | rust-8f1cceb6ffe1324d403702e2ccf48d96a74eb33b.tar.gz rust-8f1cceb6ffe1324d403702e2ccf48d96a74eb33b.zip | |
lintcheck: print warnings if we can't check out or clone a git repo
Diffstat (limited to 'clippy_dev')
| -rw-r--r-- | clippy_dev/src/lintcheck.rs | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/clippy_dev/src/lintcheck.rs b/clippy_dev/src/lintcheck.rs index 2077f393a3f..017d1e09eec 100644 --- a/clippy_dev/src/lintcheck.rs +++ b/clippy_dev/src/lintcheck.rs @@ -125,20 +125,28 @@ impl CrateSource { // clone the repo if we have not done so if !repo_path.is_dir() { println!("Cloning {} and checking out {}", url, commit); - Command::new("git") + if !Command::new("git") .arg("clone") .arg(url) .arg(&repo_path) - .output() - .expect("Failed to clone git repo!"); + .status() + .expect("Failed to clone git repo!") + .success() + { + eprintln!("Failed to clone {} into {}", url, repo_path.display()) + } } // check out the commit/branch/whatever - Command::new("git") + if !Command::new("git") .arg("checkout") .arg(commit) .current_dir(&repo_path) - .output() - .expect("Failed to check out commit"); + .status() + .expect("Failed to check out commit") + .success() + { + eprintln!("Failed to checkout {} of repo at {}", commit, repo_path.display()) + } Crate { version: commit.clone(), |
