fetcher git: don't simulate progress when clone command failed
This commit is contained in:
parent
1d9f40bca3
commit
23fc46bc09
|
@ -135,29 +135,30 @@ namespace SparkleLib {
|
|||
}
|
||||
|
||||
this.git.WaitForExit ();
|
||||
SparkleHelpers.DebugInfo ("Git", "Exit code " + this.git.ExitCode.ToString ());
|
||||
SparkleHelpers.DebugInfo ("Git", "Exit code: " + this.git.ExitCode);
|
||||
|
||||
while (percentage < 100) {
|
||||
percentage += 25;
|
||||
if (this.git.ExitCode == 0) {
|
||||
while (percentage < 100) {
|
||||
percentage += 25;
|
||||
|
||||
if (percentage >= 100)
|
||||
break;
|
||||
|
||||
base.OnProgressChanged (percentage);
|
||||
Thread.Sleep (750);
|
||||
}
|
||||
|
||||
base.OnProgressChanged (100);
|
||||
Thread.Sleep (1000);
|
||||
|
||||
if (percentage >= 100)
|
||||
break;
|
||||
|
||||
base.OnProgressChanged (percentage);
|
||||
Thread.Sleep (750);
|
||||
}
|
||||
|
||||
base.OnProgressChanged (100);
|
||||
Thread.Sleep (1000);
|
||||
|
||||
if (this.git.ExitCode != 0) {
|
||||
return false;
|
||||
|
||||
} else {
|
||||
InstallConfiguration ();
|
||||
InstallExcludeRules ();
|
||||
AddWarnings ();
|
||||
|
||||
return true;
|
||||
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue