Add summary

This commit is contained in:
Roey Darwish Dror
2018-06-03 18:04:58 +03:00
parent d473b288b3
commit 239ad6e4f3
5 changed files with 108 additions and 20 deletions

View File

@@ -38,7 +38,7 @@ impl Git {
None
}
pub fn pull<P: AsRef<Path>>(&self, path: P) -> Result<(), Error> {
pub fn pull<P: AsRef<Path>>(&self, path: P) -> Result<Option<bool>, Error> {
if let Some(git) = &self.git {
if let Ok(mut command) = Command::new(&git)
.arg("pull")
@@ -47,10 +47,10 @@ impl Git {
.current_dir(path)
.spawn()
{
command.wait()?;
return Ok(Some(command.wait()?.success()));
}
}
Ok(())
Ok(None)
}
}