Only open browser on successful publish
This checks the returned error code from `writeas` and skips the browser opening if the status != 0.
This commit is contained in:
parent
caeebc37f3
commit
30b2514b49
@ -207,10 +207,12 @@ public class WriteAs.MainWindow : Gtk.ApplicationWindow {
|
|||||||
out stdout, out stderr, out status);
|
out stdout, out stderr, out status);
|
||||||
|
|
||||||
// Open it in the browser
|
// Open it in the browser
|
||||||
var browser = AppInfo.get_default_for_uri_scheme("https");
|
if (status == 0) {
|
||||||
var urls = new List<string>();
|
var browser = AppInfo.get_default_for_uri_scheme("https");
|
||||||
urls.append(stdout.strip());
|
var urls = new List<string>();
|
||||||
browser.launch_uris(urls, null);
|
urls.append(stdout.strip());
|
||||||
|
browser.launch_uris(urls, null);
|
||||||
|
}
|
||||||
|
|
||||||
return stderr.strip();
|
return stderr.strip();
|
||||||
} catch (Error err) {
|
} catch (Error err) {
|
||||||
|
Loading…
Reference in New Issue
Block a user