diff --git a/atom/browser/auto_updater_mac.mm b/atom/browser/auto_updater_mac.mm index ace46a636f07..f0a18b56f6f9 100644 --- a/atom/browser/auto_updater_mac.mm +++ b/atom/browser/auto_updater_mac.mm @@ -36,15 +36,21 @@ void RelaunchToInstallUpdate() { // static void AutoUpdater::SetFeedURL(const std::string& feed) { if (g_updater == nil) { - // Initialize the SQRLUpdater. - NSURL* url = [NSURL URLWithString:base::SysUTF8ToNSString(feed)]; - NSURLRequest* urlRequest = [NSURLRequest requestWithURL:url]; - g_updater = [[SQRLUpdater alloc] initWithUpdateRequest:urlRequest]; - AutoUpdaterDelegate* delegate = GetDelegate(); if (!delegate) return; + // Initialize the SQRLUpdater. + NSURL* url = [NSURL URLWithString:base::SysUTF8ToNSString(feed)]; + NSURLRequest* urlRequest = [NSURLRequest requestWithURL:url]; + + @try { + g_updater = [[SQRLUpdater alloc] initWithUpdateRequest:urlRequest]; + } @catch (NSException* error) { + delegate->OnError(base::SysNSStringToUTF8(error.reason)); + return; + } + [[g_updater rac_valuesForKeyPath:@"state" observer:g_updater] subscribeNext:^(NSNumber *stateNumber) { int state = [stateNumber integerValue]; diff --git a/script/update-external-binaries.py b/script/update-external-binaries.py index fa5fe71111e8..4218bb36aa27 100755 --- a/script/update-external-binaries.py +++ b/script/update-external-binaries.py @@ -7,7 +7,7 @@ import os from lib.util import safe_mkdir, rm_rf, extract_zip, tempdir, download -VERSION = 'v0.3.0' +VERSION = 'v0.4.0' SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) FRAMEWORKS_URL = 'http://github.com/atom/atom-shell-frameworks/releases' \ '/download/' + VERSION