@@ -54,7 +54,7 @@ public class AppUpdater {
5454 guard active. isResolved else {
5555 return active
5656 }
57- guard let exename = Bundle . main. executableURL? . path else {
57+ guard Bundle . main. executableURL != nil else {
5858 return Promise ( error: Error . bundleExecutableURL)
5959 }
6060 let currentVersion = Bundle . main. version
@@ -80,8 +80,8 @@ public class AppUpdater {
8080 unzip ( dst, contentType: asset. content_type)
8181 } . compactMap { downloadedAppBundle in
8282 Bundle ( url: downloadedAppBundle)
83- } . then { downloadedAppBundle -> Promise < Path > in
84- validate ( codeSigning: . main, downloadedAppBundle)
83+ } . then { downloadedAppBundle in
84+ validate ( codeSigning: . main, downloadedAppBundle) . map { downloadedAppBundle }
8585 } . done { downloadedAppBundle in
8686
8787 // UNIX is cool. Delete ourselves, move new one in then restart.
@@ -98,9 +98,9 @@ public class AppUpdater {
9898
9999 let proc = Process ( )
100100 if #available( OSX 10 . 13 , * ) {
101- proc. launchPath = finalExecutable. string
102- } else {
103101 proc. executableURL = finalExecutable. url
102+ } else {
103+ proc. launchPath = finalExecutable. string
104104 }
105105 proc. launch ( )
106106
0 commit comments