File tree Expand file tree Collapse file tree
crates/vespertide-loader/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -324,9 +324,11 @@ actions:
324324 assert ! ( err_msg. contains( "CARGO_MANIFEST_DIR environment variable not set" ) ) ;
325325
326326 // Restore the original value if it existed
327- // Note: In a test environment, we don't restore to avoid affecting other tests
328- // The serial_test ensures tests run sequentially
329- drop ( original) ;
327+ if let Some ( val) = original {
328+ unsafe {
329+ env:: set_var ( "CARGO_MANIFEST_DIR" , val) ;
330+ }
331+ }
330332 }
331333
332334 #[ test]
Original file line number Diff line number Diff line change @@ -374,7 +374,12 @@ mod tests {
374374 let err_msg = result. unwrap_err ( ) . to_string ( ) ;
375375 assert ! ( err_msg. contains( "CARGO_MANIFEST_DIR environment variable not set" ) ) ;
376376
377- drop ( original) ;
377+ // Restore the original value if it existed
378+ if let Some ( val) = original {
379+ unsafe {
380+ env:: set_var ( "CARGO_MANIFEST_DIR" , val) ;
381+ }
382+ }
378383 }
379384
380385 #[ test]
You can’t perform that action at this time.
0 commit comments