File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -153,11 +153,9 @@ export const make = Effect.fn("cloud.server_self_update.make")(function* () {
153153 const update : ServerSelfUpdate [ "Service" ] [ "update" ] = Effect . fn (
154154 "cloud.server_self_update.update" ,
155155 ) ( function * ( input , reportProgress = ( ) => Effect . void , onHandoffAccepted = ( ) => Effect . void ) {
156- const unsafeDowngrade = crossesTrackUnsafely ( input ) ;
157156 if ( capability === "desktop-managed" ) {
158- if ( input . channel !== undefined && unsafeDowngrade !== null ) {
159- return yield * failWith ( unsafeDowngrade ) ;
160- }
157+ const unsafeCrossing = input . channel === undefined ? null : crossesTrackUnsafely ( input ) ;
158+ if ( unsafeCrossing !== null ) return yield * failWith ( unsafeCrossing ) ;
161159 if ( desktopAppUpdate . available ) {
162160 return yield * desktopAppUpdate . run (
163161 reportProgress ,
@@ -176,7 +174,8 @@ export const make = Effect.fn("cloud.server_self_update.make")(function* () {
176174 ) ;
177175 }
178176
179- if ( unsafeDowngrade !== null ) return yield * failWith ( unsafeDowngrade ) ;
177+ const unsafeCrossing = crossesTrackUnsafely ( input ) ;
178+ if ( unsafeCrossing !== null ) return yield * failWith ( unsafeCrossing ) ;
180179 const targetVersion = input . targetVersion . trim ( ) ;
181180 if ( ! isExactServiceVersion ( targetVersion ) ) {
182181 return yield * failWith ( `'${ targetVersion } ' is not an exact t3 version.` ) ;
Original file line number Diff line number Diff line change @@ -31,7 +31,11 @@ export function recordedMigrations(
3131 } catch {
3232 return null ;
3333 } finally {
34- db . close ( ) ;
34+ try {
35+ db . close ( ) ;
36+ } catch {
37+ // A read-only handle has nothing to flush; the result above already stands.
38+ }
3539 }
3640}
3741
You can’t perform that action at this time.
0 commit comments