setup: show raw (git) error message on failed add
This commit is contained in:
parent
10c6e2f5b3
commit
c17ad92a73
|
@ -128,8 +128,11 @@ namespace SparkleLib.Git {
|
|||
} else {
|
||||
SparkleHelpers.DebugInfo ("Fetcher", line);
|
||||
|
||||
if (line.StartsWith ("fatal:"))
|
||||
if (line.StartsWith ("fatal:", true, null) ||
|
||||
line.StartsWith ("error:", true, null)) {
|
||||
|
||||
base.errors.Add (line);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -475,8 +475,13 @@ namespace SparkleShare {
|
|||
points.PackStart (point_two, false, false, 12);
|
||||
|
||||
if (warnings.Length > 0) {
|
||||
string warnings_markup = "";
|
||||
|
||||
foreach (string warning in warnings)
|
||||
warnings_markup += "\n<b>" + warning + "</b>";
|
||||
|
||||
Label label_three = new Label () {
|
||||
Markup = "Here's the raw error message:\n<b>" + warnings [0] + "</b>",
|
||||
Markup = "Here's the raw error message:" + warnings_markup,
|
||||
Wrap = true,
|
||||
Xalign = 0
|
||||
};
|
||||
|
|
|
@ -578,8 +578,14 @@ namespace SparkleShare {
|
|||
" <li>Do you have access rights to this remote project?</li>" +
|
||||
"</ul>";
|
||||
|
||||
if (warnings.Length > 0)
|
||||
html = html.Replace ("</ul>", "<li>Here's the raw error message:<br/> <b>" + warnings [0] + "</b></li></ul>");
|
||||
if (warnings.Length > 0) {
|
||||
string warnings_markup = "";
|
||||
|
||||
foreach (string warning in warnings)
|
||||
warnings_markup += "<br><b>" + warning + "</b>";
|
||||
|
||||
html = html.Replace ("</ul>", "<li>Here's the raw error message: " + warnings_markup + "</li></ul>");
|
||||
}
|
||||
|
||||
web_view.MainFrame.LoadHtmlString (html, new NSUrl (""));
|
||||
web_view.DrawsBackground = false;
|
||||
|
|
|
@ -500,9 +500,13 @@ namespace SparkleShare {
|
|||
help_block.Inlines.Add ("Do you have access rights to this remote project?");
|
||||
|
||||
if (warnings.Length > 0) {
|
||||
help_block.Inlines.Add ("\n\nHere's the raw error message:\n");
|
||||
help_block.Inlines.Add (new Bold (new Run (warning [0])));
|
||||
bullets_block.Text += "\n\n•";
|
||||
help_block.Inlines.Add ("\n\nHere's the raw error message:");
|
||||
|
||||
foreach (string warning in warnings) {
|
||||
help_block.Inlines.Add ("\n");
|
||||
help_block.Inlines.Add (new Bold (new Run (warning)));
|
||||
}
|
||||
}
|
||||
|
||||
Button cancel_button = new Button () {
|
||||
|
|
Loading…
Reference in a new issue