@@ -111,29 +111,26 @@ await scenario('acquireLock: acquires, then re-acquires after release', async ()
111111 } ) ;
112112} ) ;
113113
114- await scenario (
115- 'acquireLock: surfaces ELOCKED as instance-running with rm -rf hint' ,
116- async ( ) => {
117- await withTempStorage ( async ( storageRoot ) => {
118- const lockPath = join ( storageRoot , '.lock' ) ;
119- const release = await acquireLock ( storageRoot , lockPath ) ;
120- try {
121- const err = await expectPreflightError (
122- async ( ) => {
123- await acquireLock ( storageRoot , lockPath ) ;
124- } ,
125- 'instance-running' ,
126- 'rm -rf' ,
127- ) ;
128- if ( ! err . hint || ! err . hint . includes ( `${ lockPath } .meta.json` ) ) {
129- throw new Error ( `expected hint to mention meta sidecar, got: ${ err . hint } ` ) ;
130- }
131- } finally {
132- await release ( ) ;
114+ await scenario ( 'acquireLock: surfaces ELOCKED as instance-running with rm -rf hint' , async ( ) => {
115+ await withTempStorage ( async ( storageRoot ) => {
116+ const lockPath = join ( storageRoot , '.lock' ) ;
117+ const release = await acquireLock ( storageRoot , lockPath ) ;
118+ try {
119+ const err = await expectPreflightError (
120+ async ( ) => {
121+ await acquireLock ( storageRoot , lockPath ) ;
122+ } ,
123+ 'instance-running' ,
124+ 'rm -rf' ,
125+ ) ;
126+ if ( ! err . hint || ! err . hint . includes ( `${ lockPath } .meta.json` ) ) {
127+ throw new Error ( `expected hint to mention meta sidecar, got: ${ err . hint } ` ) ;
133128 }
134- } ) ;
135- } ,
136- ) ;
129+ } finally {
130+ await release ( ) ;
131+ }
132+ } ) ;
133+ } ) ;
137134
138135await scenario ( 'acquireLock: legacy `.lock` file is migrated away' , async ( ) => {
139136 await withTempStorage ( async ( storageRoot ) => {
0 commit comments