Skip to content

Commit

Permalink
adding errors for pull
Browse files Browse the repository at this point in the history
  • Loading branch information
mckernant1 committed Dec 21, 2019
1 parent 059f316 commit b67af8c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
clap = {version = "~2.33.0", features = ["yaml"]}
clap = {version = "~2.33.0", features = ["yaml", "color"]}
json = "0.11.15"
spinners = "1.0.0"
9 changes: 7 additions & 2 deletions src/subcommands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,16 @@ pub fn pull(matches: ArgMatches, settings_file: SettingsFile) {
let spinner = Spinner::new(Spinners::Dots, "Pulling all repos...".into());
for member in repos.members() {
child_list.push(
(member["path"].as_str().unwrap(),
exec_git(vec!["-C", member["path"].as_str().unwrap(), "pull"], Option::None, Option::None)
)
)
}
for mut child in child_list {
child.wait().unwrap();
for (path, mut child) in child_list {
let exit_status = child.wait().unwrap();
if !exit_status.success() {
eprintln!("\n{} has failed with status {}", path, exit_status.code().unwrap());
}
}
spinner.stop();
println!("\nDone!")
Expand Down

0 comments on commit b67af8c

Please sign in to comment.