diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-29 02:16:43 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-29 02:17:57 +0900 |
| commit | 3b28fc65f5de7c6ad69bee48b2d1f52dd9b30972 (patch) | |
| tree | dd2567446a1fe6e7245fd35190dc039bb46cc86b /crates/shirabe/src/command/audit_command.rs | |
| parent | 1036b7e33a4360df8b99f81ef03492fee8328bd0 (diff) | |
| download | php-shirabe-3b28fc65f5de7c6ad69bee48b2d1f52dd9b30972.tar.gz php-shirabe-3b28fc65f5de7c6ad69bee48b2d1f52dd9b30972.tar.zst php-shirabe-3b28fc65f5de7c6ad69bee48b2d1f52dd9b30972.zip | |
fix(advisory): pass IO as shared handle to Auditor::audit
Auditor::audit took io as &mut dyn IOInterface, forcing the audit and
installer post-audit call sites to hold a borrow_mut() on the shared IO
RefCell for the whole call. During advisory fetching the repositories
write to their own clones of the same handle, so the borrow_mut()
collided with their borrow() and panicked with 'RefCell already mutably
borrowed' on 'audit --locked'. Take the Rc<RefCell<dyn IOInterface>>
handle instead so writes borrow briefly and never overlap. Un-ignore the
locked-audit regression test that this unblocks.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/command/audit_command.rs')
| -rw-r--r-- | crates/shirabe/src/command/audit_command.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/shirabe/src/command/audit_command.rs b/crates/shirabe/src/command/audit_command.rs index 24af44c..d8666bb 100644 --- a/crates/shirabe/src/command/audit_command.rs +++ b/crates/shirabe/src/command/audit_command.rs @@ -202,7 +202,7 @@ impl Command for AuditCommand { let audit_format = self.get_audit_format(input, "format")?; Ok(auditor .audit( - &mut *self.get_io().borrow_mut(), + &self.get_io(), &repo_set, packages, &audit_format, |
